void factor_vm::gc(gc_op op, cell requested_size, bool trace_contexts_p)
{
- assert(!gc_off);
- assert(!current_gc);
+ FACTOR_ASSERT(!gc_off);
+ FACTOR_ASSERT(!current_gc);
/* Important invariant: tenured space must have enough contiguous free
space to fit the entire contents of the aging space and nursery. This is
because when doing a full collection, objects from younger generations
are promoted before any unreachable tenured objects are freed. */
- assert(!data->high_fragmentation_p());
+ FACTOR_ASSERT(!data->high_fragmentation_p());
current_gc = new gc_state(op,this);
atomic::store(¤t_gc_p, true);
current_gc = NULL;
/* Check the invariant again, just in case. */
- assert(!data->high_fragmentation_p());
+ FACTOR_ASSERT(!data->high_fragmentation_p());
}
/* primitive_minor_gc() is invoked by inline GC checks, and it needs to fill in
code_block *compiled = parent->frame_code(frame);
gc_info *info = compiled->block_gc_info();
- assert(return_address < compiled->size());
+ FACTOR_ASSERT(return_address < compiled->size());
cell index = info->return_address_index(return_address);
if(index != (cell)-1)
ctx->scrub_stacks(info,index);