4 * It is up to the caller to fill in the object's fields in a meaningful
8 inline object* factor_vm::allot_object(cell type, cell size) {
10 FACTOR_ASSERT(!current_gc);
13 /* If the object is smaller than the nursery, allocate it in the nursery,
14 after a GC if needed */
15 if (nursery.size > size) {
16 /* If there is insufficient room, collect the nursery */
17 if (nursery.here + size > nursery.end)
20 object* obj = nursery.allot(size);
22 obj->initialize(type);
24 } /* If the object is bigger than the nursery, allocate it in
27 return allot_large_object(type, size);