gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gcl-devel] [PATCH 10/11] Reduce threshold for increasing maxpage


From: Will Newton
Subject: [Gcl-devel] [PATCH 10/11] Reduce threshold for increasing maxpage
Date: Wed, 11 Jun 2014 17:27:23 +0100

From: Will Newton <address@hidden>

With the current code the size of the type managers increases
very rapidly and GC is rare (e.g. 80MB of conses with 92% free
after GC). Decrease the threshold to slow down the size increase
and increase the amount of GC.
---
 gcl/o/alloc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcl/o/alloc.c b/gcl/o/alloc.c
index f9a1f3b..038ad36 100644
--- a/gcl/o/alloc.c
+++ b/gcl/o/alloc.c
@@ -385,7 +385,7 @@ grow_linear(fixnum old, fixnum fract, fixnum grow_min, 
fixnum grow_max,fixnum ma
    (gbc_rate_other_types + gbc_rate_this_type *
    current_maxpage/new_maxpage)*(sum_all_maxpages-current_maxpage+new_maxpage).
    If the benefit in the product from adopting the new_maxpage is
-   greater than 5%, we adopt it, and adjust the gbccount for the new
+   greater than 10%, we adopt it, and adjust the gbccount for the new
    basis.  Corrections are put in place for small GBC counts, and the
    possibility that GBC calls of only a single type are ever
    triggered, in which case the optimum new_maxpage would diverge in
@@ -440,7 +440,7 @@ opt_maxpage(struct typemanager *my_tm) {
   if (sSAnotify_optimize_maximum_pagesA->s.s_dbind!=sLnil)
     printf("[type %u max %lu(%lu) opt %lu   y %lu(%lu) gbcrat %f sav %f]\n",
           
my_tm->tm_type,mmax_page,mro,(long)z,(long)y,tro,(my_tm->tm_adjgbccnt-1)/(1+x-0.9*my_tm->tm_adjgbccnt),r);
-  return r<=0.95 && set_tm_maxpage(my_tm,z+mro) ? 1 : 0;
+  return r<=0.90 && set_tm_maxpage(my_tm,z+mro) ? 1 : 0;
 
 }
 
-- 
1.9.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]