Fix GC crash with -generations=2

db4
Slava Pestov 2008-12-09 16:26:30 -06:00
parent ea4feee886
commit 9ad51490af
3 changed files with 4 additions and 3 deletions

View File

@ -147,6 +147,8 @@ void apply_relocation(CELL class, CELL offset, F_FIXNUM absolute_value)
/* Perform all fixups on a code block */
void relocate_code_block(F_COMPILED *compiled, CELL code_start, CELL literals_start)
{
compiled->last_scan = NURSERY;
if(compiled->relocation != F)
{
F_BYTE_ARRAY *relocation = untag_object(compiled->relocation);

View File

@ -32,9 +32,7 @@ F_DATA_HEAP *alloc_data_heap(CELL gens,
data_heap->gen_count = gens;
CELL total_size;
if(data_heap->gen_count == 1)
total_size = 2 * tenured_size;
else if(data_heap->gen_count == 2)
if(data_heap->gen_count == 2)
total_size = young_size + 2 * tenured_size;
else if(data_heap->gen_count == 3)
total_size = young_size + 2 * aging_size + 2 * tenured_size;

View File

@ -137,6 +137,7 @@ void collect_cards(void);
/* the oldest generation */
#define TENURED (data_heap->gen_count-1)
#define MIN_GEN_COUNT 1
#define MAX_GEN_COUNT 3
/* used during garbage collection only */