Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
34 lines (28 sloc) 695 Bytes
namespace factor
* It is up to the caller to fill in the object's fields in a meaningful
* fashion!
inline object *factor_vm::allot_object(cell type, cell size)
/* If the object is smaller than the nursery, allocate it in the nursery,
after a GC if needed */
if(nursery.size > size)
/* If there is insufficient room, collect the nursery */
if( + size > nursery.end)
object *obj = nursery.allot(size);
return obj;
/* If the object is bigger than the nursery, allocate it in
tenured space */
return allot_large_object(type,size);
Jump to Line
Something went wrong with that request. Please try again.