2011-03-15 Ivan Maidanski <ivmai@mail.ru>
authorivmai <ivmai>
Tue, 15 Mar 2011 16:06:57 +0000 (16:06 +0000)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 26 Jul 2011 17:06:56 +0000 (21:06 +0400)
* 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.

ChangeLog
doc/README.macros
include/private/gc_hdrs.h
include/private/gc_priv.h

index ef76892..69f2383 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2011-03-15  Ivan Maidanski  <ivmai@mail.ru>
 
+       * 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  <ivmai@mail.ru>
+
        * alloc.c (GC_finish_collection): Replace "#else #ifdef" with
        "#elif".
        * include/private/gc_priv.h (CPP_LOG_HBLKSIZE, LOG_PHT_ENTRIES,
index 6e9ebd8..ee42f4e 100644 (file)
@@ -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
index f2acb4c..777b016 100644 (file)
@@ -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)
 
index d9815ce..79e9555 100644 (file)
@@ -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