--- /home/jfw/build/Scheme/chicken-core/runtime.c 2011-10-14 18:24:28.000000000 +0200 +++ runtime.c 2011-10-14 21:42:50.798314875 +0200 @@ -2670,7 +2670,7 @@ C_uword count, bytes; C_word *p, **msp, bucket, last, item, container; C_header h; - C_byte *tmp, *start; + C_byte *tmp, *start = C_fromspace_top; LF_LIST *lfn; C_SCHEME_BLOCK *bp; C_GC_ROOT *gcrp; @@ -2696,7 +2696,7 @@ gc_mode = GC_MINOR; /* Entry point for second-level GC (on explicit request or because of full fromspace): */ - if(C_setjmp(gc_restart) || (start = C_fromspace_top) >= C_fromspace_limit) { + if(C_setjmp(gc_restart) || start >= C_fromspace_limit) { if(gc_bell) { C_putchar(7); C_fflush(stdout); @@ -2972,15 +2972,16 @@ (C_uword)tospace_start, (C_uword)tospace_top, (C_uword)tospace_limit); - if(gc_mode == GC_MAJOR && C_enable_gcweak && weakn) - C_dbg("GC", C_text("%d recoverable weakly held items found\n"), weakn); + if(gc_mode == GC_MAJOR && C_enable_gcweak) + if(weakn) C_dbg("GC", C_text("%d recoverable weakly held items found\n"), weakn); C_dbg("GC", C_text("%d locatives (from %d)\n"), locative_table_count, locative_table_size); } - if(gc_mode == GC_MAJOR) gc_count_1 = 0; - - if(C_post_gc_hook != NULL) C_post_gc_hook(gc_mode, (long)tgc); + if(gc_mode == GC_MAJOR) { + gc_count_1 = 0; + if(C_post_gc_hook != NULL) C_post_gc_hook(gc_mode, (long)tgc); + } /* Jump from the Empire State Building... */ C_longjmp(C_restart, 1); @@ -6970,6 +6971,8 @@ if(c == 3) { arg = va_arg(v, C_word); f = C_truep(arg); + if((arg & C_FIXNUM_BIT) != 0) size = C_unfix(arg); + else if(arg == C_SCHEME_END_OF_LIST) size = percentage(heap_size, C_heap_growth); } else if(c != 2) C_bad_min_argc(c, 2); else f = 1; @@ -6977,11 +6980,6 @@ C_save(k); va_end(v); - if(c == 3) { - if((arg & C_FIXNUM_BIT) != 0) size = C_unfix(arg); - else if(arg == C_SCHEME_END_OF_LIST) size = percentage(heap_size, C_heap_growth); - } - if(size && !C_heap_size_is_fixed) { C_rereclaim2(size, 0); gc_2(NULL);