From: ivmai Date: Tue, 15 Mar 2011 16:06:57 +0000 (+0000) Subject: 2011-03-15 Ivan Maidanski X-Git-Tag: gc7_2alpha6~89 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dc399deadba2c4344d3e9952d1ee2b7bbf24b5e5;p=platform%2Fupstream%2Flibgc.git 2011-03-15 Ivan Maidanski * doc/README.macros (SMALL_CONFIG, LARGE_CONFIG): Refine the documentation. * include/private/gc_hdrs.h (LOG_BOTTOM_SZ): Ignore SMALL_CONFIG if LARGE_CONFIG is defined. * include/private/gc_priv.h (CPP_LOG_HBLKSIZE): Ditto. --- diff --git a/ChangeLog b/ChangeLog index ef76892..69f2383 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2011-03-15 Ivan Maidanski + * doc/README.macros (SMALL_CONFIG, LARGE_CONFIG): Refine the + documentation. + * include/private/gc_hdrs.h (LOG_BOTTOM_SZ): Ignore SMALL_CONFIG + if LARGE_CONFIG is defined. + * include/private/gc_priv.h (CPP_LOG_HBLKSIZE): Ditto. + +2011-03-15 Ivan Maidanski + * alloc.c (GC_finish_collection): Replace "#else #ifdef" with "#elif". * include/private/gc_priv.h (CPP_LOG_HBLKSIZE, LOG_PHT_ENTRIES, diff --git a/doc/README.macros b/doc/README.macros index 6e9ebd8..ee42f4e 100644 --- a/doc/README.macros +++ b/doc/README.macros @@ -146,8 +146,10 @@ ALL_INTERIOR_POINTERS Allows all pointers to the interior of objects to be GC_all_interior_pointers can be set at process initialization time. SMALL_CONFIG Tries to tune the collector for small heap sizes, - usually causing it to use less space in such situations. - Incremental collection no longer works in this case. + usually causing it to use less space in such situations. Incremental + collection no longer works in this case. Also, removes some + statistic-printing code. Turns off some optimization algorithms (like data + prefetching in the mark routine). GC_DISABLE_INCREMENTAL Turn off the incremental collection support. @@ -159,7 +161,9 @@ NO_INCREMENTAL Causes the gctest program to not invoke the incremental LARGE_CONFIG Tunes the collector for unusually large heaps. Necessary for heaps larger than about 4 GiB on most (64-bit) machines. Recommended for heaps larger than about 500 MiB. Not recommended for - embedded systems. + embedded systems. Could be used in conjunction with SMALL_CONFIG to + generate smaller code (by disabling incremental collection support, + statistic printing and some optimization algorithms). DONT_ADD_BYTE_AT_END Meaningful only with ALL_INTERIOR_POINTERS or GC_all_interior_pointers = 1. Normally ALL_INTERIOR_POINTERS diff --git a/include/private/gc_hdrs.h b/include/private/gc_hdrs.h index f2acb4c..777b016 100644 --- a/include/private/gc_hdrs.h +++ b/include/private/gc_hdrs.h @@ -41,11 +41,11 @@ typedef struct hblkhdr hdr; #endif /* Define appropriate out-degrees for each of the two tree levels */ -#ifdef SMALL_CONFIG +#if defined(LARGE_CONFIG) || !defined(SMALL_CONFIG) +# define LOG_BOTTOM_SZ 10 +#else # define LOG_BOTTOM_SZ 11 /* Keep top index size reasonable with smaller blocks. */ -#else -# define LOG_BOTTOM_SZ 10 #endif #define BOTTOM_SZ (1 << LOG_BOTTOM_SZ) diff --git a/include/private/gc_priv.h b/include/private/gc_priv.h index d9815ce..79e9555 100644 --- a/include/private/gc_priv.h +++ b/include/private/gc_priv.h @@ -620,12 +620,14 @@ GC_EXTERN GC_warn_proc GC_current_warn_proc; /* Alpha: Seems to be used with 8K pages. */ /* SMALL_CONFIG: Want less block-level fragmentation. */ #ifndef HBLKSIZE -# ifdef SMALL_CONFIG -# define CPP_LOG_HBLKSIZE 10 -# elif defined(ALPHA) -# define CPP_LOG_HBLKSIZE 13 +# if defined(LARGE_CONFIG) || !defined(SMALL_CONFIG) +# ifdef ALPHA +# define CPP_LOG_HBLKSIZE 13 +# else +# define CPP_LOG_HBLKSIZE 12 +# endif # else -# define CPP_LOG_HBLKSIZE 12 +# define CPP_LOG_HBLKSIZE 10 # endif #else # if HBLKSIZE == 512