Cyclone Scheme  0.28.0

◆ gc_sweep()

gc_heap* gc_sweep ( gc_heap h,
gc_thread_data thd 
)

Sweep portion of the GC algorithm.

Parameters
hHeap to sweep
thdThread data object for the mutator using this heap
Returns
Pointer to the heap, or NULL if heap is to be freed

This portion of the major GC algorithm is responsible for returning unused memory slots to the heap. It is only called by the allocator to free up space after the heap has been traced to identify live objects.