|
libmemalloc
v3.0.00
Modern Memory Allocator
|
Orchestrates the background mark-and-sweep garbage collector. More...
Public Attributes | |
| pthread_t | gc_thread |
| pthread_t | main_thread |
| bool | gc_running |
| bool | gc_exit |
| uint16_t | gc_thread_started |
| uint32_t | gc_interval_ms |
| pthread_cond_t | gc_cond |
| pthread_mutex_t | gc_lock |
Orchestrates the background mark-and-sweep garbage collector.
The structure encapsulates all state and synchronization needed to run the garbage collector in its own thread. Once started, the GC thread will periodically wake up, scan the heap and any mapped regions for unreachable objects, reclaim them, and then sleep again. The structure holds the timing parameters, the thread handle, and the primitives used to signal the collector to start or stop its work.
| pthread_cond_t gc_thread_t::gc_cond |
Condition variable for GC signaling
| bool gc_thread_t::gc_exit |
Flag to signal GC shutdown
| uint32_t gc_thread_t::gc_interval_ms |
Interval between GC cycles (ms)
| pthread_mutex_t gc_thread_t::gc_lock |
Mutex protecting the condition
| bool gc_thread_t::gc_running |
Flag indicating GC is running
| pthread_t gc_thread_t::gc_thread |
GC thread handle
| uint16_t gc_thread_t::gc_thread_started |
Indicates whether GC thread has started
| pthread_t gc_thread_t::main_thread |
Main thread handle