<short summary of the patch>
authorCamm Maguire <camm@debian.org>
Thu, 11 Aug 2022 17:16:42 +0000 (18:16 +0100)
committerCamm Maguire <camm@debian.org>
Thu, 11 Aug 2022 17:16:42 +0000 (18:16 +0100)
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-13) unstable; urgency=medium

  * Version_2_6_13pre16

Gbp-Pq: Name Version_2_6_13pre17

o/alloc.c
o/main.c

index 5982cd0af2980e8e981cccff92d438b153679095..154043fee8fc47f6a655869376a49e28d3188414 100644 (file)
--- a/o/alloc.c
+++ b/o/alloc.c
@@ -749,11 +749,15 @@ alloc_from_freelist(struct typemanager *tm,fixnum n) {
 static inline void
 grow_linear1(struct typemanager *tm) {
   
-  fixnum maxgro=resv_pages ? available_pages : 0;
+  if (!sSAoptimize_maximum_pagesA || sSAoptimize_maximum_pagesA->s.s_dbind==Cnil) {
 
-  if (tm->tm_type==t_relocatable) maxgro>>=1;
+    fixnum maxgro=resv_pages ? available_pages : 0;
 
-  set_tm_maxpage(tm,grow_linear(tm->tm_npage,tm->tm_growth_percent,tm->tm_min_grow, tm->tm_max_grow,maxgro));
+    if (tm->tm_type==t_relocatable) maxgro>>=1;
+
+    set_tm_maxpage(tm,grow_linear(tm->tm_npage,tm->tm_growth_percent,tm->tm_min_grow, tm->tm_max_grow,maxgro));
+
+  }
 
 }
 
@@ -802,7 +806,8 @@ do_gc_p(struct typemanager *tm,fixnum n) {
 
   pp=gc_page_max*phys_pages;
 
-  return page(recent_allocation)>(1.0+gc_alloc_min-(double)ufmin(cpool,pp)/pp)*data_pages();
+  return page(recent_allocation)>(1.0+gc_alloc_min-(double)ufmin(cpool,pp)/pp)*data_pages() ||
+    2*tpage(tm,n)>available_pages;
 
 }
   
index 4fa47f3c556ab64967479db774d27369febb008b..b93f486bd7b20892d0e852380aba85be50ddcffb 100755 (executable)
--- a/o/main.c
+++ b/o/main.c
@@ -236,7 +236,7 @@ get_gc_environ(void) {
     massert(mem_multiple>=0.0);
   }
 
-  gc_alloc_min=0.1;
+  gc_alloc_min=0.05;
   if ((e=getenv("GCL_GC_ALLOC_MIN"))) {
     massert(sscanf(e,"%lf",&gc_alloc_min)==1);
     massert(gc_alloc_min>=0.0);
@@ -280,7 +280,7 @@ setup_maxpages(double scale) {
   resv_pages=available_pages=0;
   available_pages=check_avail_pages();
   
-  resv_pages=40<available_pages ? 40 : available_pages;
+  resv_pages=available_pages/100;
   available_pages-=resv_pages;
   
   recent_allocation=0;