vm: on 32-bit, the largest free block size was only 512mb, leading to weird errors if the heap grew beyond this. eliminate this limit

db4
Slava Pestov 2009-11-06 08:44:36 -06:00
parent 11075828e5
commit 43e08c76fb
3 changed files with 4 additions and 4 deletions

View File

@ -14,12 +14,12 @@ struct free_heap_block
cell size() const
{
return header >> 3;
return header & ~7;
}
void make_free(cell size)
{
header = (size << 3) | 1;
header = size | 1;
}
};

View File

@ -187,7 +187,7 @@ void factor_vm::gc(gc_op op, cell requested_bytes, bool trace_contexts_p)
collect_growing_heap(requested_bytes,trace_contexts_p);
break;
default:
critical_error("Bad GC op\n",current_gc->op);
critical_error("Bad GC op",current_gc->op);
break;
}

View File

@ -246,7 +246,7 @@ struct code_block
cell size() const
{
return header >> 3;
return header & ~7;
}
void *xt() const