diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2012-04-04 13:28:11 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2012-04-04 13:28:11 -0700 |
commit | 22549f7e02841d5e6fcc6654dbaddcedc485f7e3 (patch) | |
tree | d5c9bbb90f439993820c5668940d8fc3fb24f0eb | |
parent | 546385def966f1baa475ab1552394f60a3f61a86 (diff) | |
download | txr-22549f7e02841d5e6fcc6654dbaddcedc485f7e3.tar.gz txr-22549f7e02841d5e6fcc6654dbaddcedc485f7e3.tar.bz2 txr-22549f7e02841d5e6fcc6654dbaddcedc485f7e3.zip |
* configure (gen_gc): Default to off.
Help section added for gen_gc variable.
* gc.c (gc): Some missing CONFIG_GEN_GC added.
-rw-r--r-- | ChangeLog | 7 | ||||
-rwxr-xr-x | configure | 9 | ||||
-rw-r--r-- | gc.c | 8 |
3 files changed, 23 insertions, 1 deletions
@@ -1,5 +1,12 @@ 2012-04-04 Kaz Kylheku <kaz@kylheku.com> + * configure (gen_gc): Default to off. + Help section added for gen_gc variable. + + * gc.c (gc): Some missing CONFIG_GEN_GC added. + +2012-04-04 Kaz Kylheku <kaz@kylheku.com> + Code cleanup. * gc.c (backptr_oflow): Static variable removed. @@ -139,7 +139,7 @@ valgrind=${valgrind-} lit_align=${lit_align-} extra_debugging=${extra_debugging-} debug_support=${debug_support-y} -gen_gc=${gen_gc-y} +gen_gc=${gen_gc-} mpi_version=1.8.6 have_quilt= have_patch= @@ -349,6 +349,13 @@ extra_debugging [$extra_debugging] Use --extra_debugging to configure some additional debugging features, which incur a run-time penalty. + +gen_gc [$gen_gc] + + Use --gen-gc to enable the experimental generational garbage collector. + This is currently disabled by default: a mark-and-sweep garbage collection + strategy is used which performs a full sweep. + ! exit 1 fi @@ -534,7 +534,9 @@ static int_ptr_t sweep(void) void gc(void) { val gc_stack_top = nil; +#if CONFIG_GEN_GC int exhausted = (free_list == 0); +#endif if (gc_enabled) { int swept; @@ -552,10 +554,16 @@ void gc(void) mark(&mc, &gc_stack_top); hash_process_weak(); swept = sweep(); +#if CONFIG_GEN_GC if (full_gc && swept < 3 * HEAP_SIZE / 4) more(); else if (!full_gc && swept < HEAP_SIZE / 4 && exhausted) more(); +#else + if (swept < 3 * HEAP_SIZE / 4) + more(); +#endif + #if CONFIG_GEN_GC backptr_idx = 0; freshobj_idx = 0; |