From 615f5e0e2d881e3d42a574e026e65e73b3a02e26 Mon Sep 17 00:00:00 2001 From: hboehm Date: Tue, 8 Jan 2008 06:07:39 +0000 Subject: [PATCH] 2008-01-07 Hans Boehm * include/private/gc_priv.h: Update MAX_ROOT_SETS and LOG_PHT_ENTRIES to handle larger heaps. --- ChangeLog | 11 ++++++++--- include/private/gc_priv.h | 31 ++++++++++++++++++++----------- 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 89bd1a99..93abf177 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,15 +1,20 @@ -2007-01-03 Hans Boehm +2008-01-07 Hans Boehm + + * include/private/gc_priv.h: Update MAX_ROOT_SETS + and LOG_PHT_ENTRIES to handle larger heaps. + +2008-01-03 Hans Boehm * include/gc.h (GC_INIT,GC_init): Update comments. -2007-01-03 Hans Boehm (based on a patch from +2008-01-03 Hans Boehm (based on a patch from John Bowman, and an ancient patch from Fergus Henderson) * allchblk.c, alloc.c, include/private/gc_priv.h: Track GC_bytes_dropped and use in GC triggering decisions. * alloc.c (min_bytes_allocd): Weight atomic blocks less. -2007-01-02 Hans Boehm +2008-01-02 Hans Boehm * alloc.c (GC_add_to_heap): Call GC_install_header(p) AFTER adjusting p. diff --git a/include/private/gc_priv.h b/include/private/gc_priv.h index a1e931e5..8feeabdb 100644 --- a/include/private/gc_priv.h +++ b/include/private/gc_priv.h @@ -589,19 +589,26 @@ extern GC_warn_proc GC_current_warn_proc; */ # ifdef LARGE_CONFIG -# define LOG_PHT_ENTRIES 20 /* Collisions likely at 1M blocks, */ +# if CPP_WORDSZ == 32 +# define LOG_PHT_ENTRIES 20 /* Collisions likely at 1M blocks, */ /* which is >= 4GB. Each table takes */ /* 128KB, some of which may never be */ /* touched. */ +# else +# define LOG_PHT_ENTRIES 21 /* Collisions likely at 2M blocks, */ + /* which is >= 8GB. Each table takes */ + /* 256KB, some of which may never be */ + /* touched. */ +# endif # else # ifdef SMALL_CONFIG -# define LOG_PHT_ENTRIES 14 /* Collisions are likely if heap grows */ - /* to more than 16K hblks = 64MB. */ - /* Each hash table occupies 2K bytes. */ +# define LOG_PHT_ENTRIES 15 /* Collisions are likely if heap grows */ + /* to more than 32K hblks = 128MB. */ + /* Each hash table occupies 4K bytes. */ # else /* default "medium" configuration */ -# define LOG_PHT_ENTRIES 16 /* Collisions are likely if heap grows */ - /* to more than 64K hblks >= 256MB. */ - /* Each hash table occupies 8K bytes. */ +# define LOG_PHT_ENTRIES 18 /* Collisions are likely if heap grows */ + /* to more than 256K hblks >= 1GB. */ + /* Each hash table occupies 32K bytes. */ /* Even for somewhat smaller heaps, */ /* say half that, collisions may be an */ /* issue because we blacklist */ @@ -780,11 +787,13 @@ struct hblk { /* MAX_ROOT_SETS is the maximum number of ranges that can be */ /* registered as static roots. */ # ifdef LARGE_CONFIG -# define MAX_ROOT_SETS 4096 +# define MAX_ROOT_SETS 8192 # else - /* GCJ LOCAL: MAX_ROOT_SETS increased to permit more shared */ - /* libraries to be loaded. */ -# define MAX_ROOT_SETS 1024 +# ifdef SMALL_CONFIG +# define MAX_ROOT_SETS 512 +# else +# define MAX_ROOT_SETS 2048 +# endif # endif # define MAX_EXCLUSIONS (MAX_ROOT_SETS/4) -- 2.40.0