Cyclone Scheme  0.28.0

◆ gc_try_alloc()

void* gc_try_alloc ( gc_heap h,
size_t  size,
char *  obj,
gc_thread_data thd 
)

Attempt to allocate a new heap slot for the given object.

Parameters
hHeap to allocate from
sizeSize of the requested object, in bytes
objObject containing data that will be copied to the heap
thdThread data for the mutator using this heap
Returns
Pointer to the newly-allocated object, or NULL if allocation failed

This function will fail if there is no space on the heap for the requested object.