Author: dlichteblau Date: Sat Aug 26 11:48:20 2006 New Revision: 12
Modified: trunk/sb-heapdump/NEWS trunk/sb-heapdump/relocate.c Log: Map heap files into the youngest non-empty (!) generation >= 2.
Previously generation 2 was always used, which seems to have stopped working in SBCL 0.9.13.22.
Modified: trunk/sb-heapdump/NEWS ============================================================================== --- trunk/sb-heapdump/NEWS (original) +++ trunk/sb-heapdump/NEWS Sat Aug 26 11:48:20 2006 @@ -1,3 +1,6 @@ +Changes in svn: + writeme + Changes in sb-heapdump-05 * x86-64 fixes * PowerPC/cheneygc port
Modified: trunk/sb-heapdump/relocate.c ============================================================================== --- trunk/sb-heapdump/relocate.c (original) +++ trunk/sb-heapdump/relocate.c Sat Aug 26 11:48:20 2006 @@ -104,8 +104,6 @@ large_object_size = los; }
-#define GEN 2 - void * map_dumpfile(int fd, long offset, int verbose) { @@ -115,6 +113,7 @@ long start_page, end_page; long npages; long i; + int gen = 2; /* fixme: why not 1? */
if (!reloctab_initialized) { relocate_init(); @@ -175,10 +174,14 @@ #endif );
+ while (gen <= HIGHEST_NORMAL_GENERATION + && !generations[gen].bytes_allocated) + gen++; + for (i = 0; i < npages; i++) { long page = start_page + i; page_table[page].allocated = BOXED_PAGE_FLAG; - page_table[page].gen = GEN; + page_table[page].gen = gen; page_table[page].large_object = 0; page_table[page].first_object_offset = -(PAGE_BYTES * i); page_table[page].bytes_used = PAGE_BYTES; @@ -191,11 +194,11 @@ page_table[page].dont_move = 0; } page_table[end_page - 1].bytes_used = length - PAGE_BYTES * (npages-1); - generations[GEN].bytes_allocated += length; + generations[gen].bytes_allocated += length; #if 0 /* fixme: do we need these? */ bytes_allocated += length; - generations[GEN].cum_sum_bytes_allocated += length; + generations[gen].cum_sum_bytes_allocated += length; #endif
if (last_free_page < end_page)