From: Camm Maguire Date: Sun, 13 Nov 2022 12:55:14 +0000 (+0000) Subject: X-Git-Tag: archive/raspbian/2.7.1-4+rpi1~2^2^2~129 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f4c77922d5b454d731a59291a1362a637b3dd1fa;p=gcl27.git TODO: Put a short summary on the line above and replace this paragraph with a longer explanation of this change. Complete the meta-information with other relevant fields (see below for details). To make it easier, the information below has been extracted from the changelog. Adjust it or drop it. gcl (2.6.12-12) unstable; urgency=medium * Version_2_6_13pre13 Gbp-Pq: Name Version_2_6_13pre13 --- diff --git a/h/protoize.h b/h/protoize.h index 6664f89..37f058f 100644 --- a/h/protoize.h +++ b/h/protoize.h @@ -1918,7 +1918,7 @@ void allocate_code_block_reserve(void); void * -alloc_contblock_no_gc(size_t); +alloc_contblock_no_gc(size_t,char *); void reset_contblock_freelist(void); diff --git a/o/alloc.c b/o/alloc.c index 5d6fd8c..7aaa03b 100644 --- a/o/alloc.c +++ b/o/alloc.c @@ -1047,7 +1047,7 @@ alloc_contblock(size_t n) { } void * -alloc_contblock_no_gc(size_t n) { +alloc_contblock_no_gc(size_t n,char *limit) { struct typemanager *tm=tm_of(t_contiguous); void *p; @@ -1057,7 +1057,7 @@ alloc_contblock_no_gc(size_t n) { if ((p=alloc_from_freelist(tm,n))) return p; - if (tpage(tm,n)<(rb_start-heap_end)>>PAGEWIDTH && (p=alloc_after_adding_pages(tm,n))) + if (tpage(tm,n)<(limit-heap_end)>>PAGEWIDTH && (p=alloc_after_adding_pages(tm,n))) return p; return NULL; diff --git a/o/gbc.c b/o/gbc.c index eb56687..7b58e6c 100755 --- a/o/gbc.c +++ b/o/gbc.c @@ -431,29 +431,21 @@ collecting(void *p) { static ufixnum ngc_thresh; static union {struct dummy d;ufixnum f;} rst={.f=-1}; -/* static object lcv=Cnil; */ +static void *static_promotion_limit; static inline void mark_leaf_data(object x,void **pp,ufixnum s,ufixnum r) { - void *p=*pp,*dp/* ,*dpe */; + void *p=*pp,*dp; if (!marking(p)||!collecting(p)) return; - /* if (lcv!=Cnil && !collecting(lcv->st.st_self) && */ - /* (dp=PCEI(lcv->st.st_self,r)) && dp+s<=(dpe=lcv->st.st_self+lcv->st.st_dim) */ - /* && x && x->d.st>=ngc_thresh) { */ - if (what_to_collect!=t_contiguous && x && x->d.st>=ngc_thresh && - (dp=alloc_contblock_no_gc(s))) { + (dp=alloc_contblock_no_gc(s,static_promotion_limit))) { - /* fprintf(stderr,"Promoting %p,%lu to %p\n",p,s,dp); */ - /* fflush(stderr); */ - *pp=memcpy(dp,p,s); - /* lcv->st.st_fillp=lcv->st.st_dim=(dpe-(void *)(lcv->st.st_self=dp+s)); */ x->d.st=0; return; @@ -1204,8 +1196,10 @@ GBC(enum type t) { if (gc_time >=0 && !gc_recursive++) {gc_start=runtime();} - if (COLLECT_RELBLOCK_P) + if (COLLECT_RELBLOCK_P) { + static_promotion_limit=rb_start