mem_pool module for another type of allocation optimization feature.
Typedefs | |
| typedef __peak_garbage * | peak_garbage |
| Opaque garbage collector pointer type. | |
| typedef void(* | peak_garbage_callback )(peak_garbage g, void *ptr, void *context) |
| Deletion's callback definition. | |
Functions | |
| peak_garbage | peak_garbage_create (int max_ptrs, double frequency, peak_task task, peak_garbage_callback callout, void *context) |
| Create a garbage object. | |
| void | peak_garbage_collect (peak_garbage g, void *ptr) |
| Collect a pointer and schedules the garbage's task for deletion. | |
| int | peak_garbage_get_collected_count (peak_garbage g) |
| Get the current number of pointers collected for deletion. | |
| void | peak_garbage_vacuum (peak_garbage g) |
| Perform manual vacuuming. | |
|
||||||||||||
|
Collect a pointer and schedules the garbage's task for deletion. Guaranteed O(1) unless max_ptrs is reached.
|
|
||||||||||||||||||||||||
|
Create a garbage object.
|
|
|
Get the current number of pointers collected for deletion.
|
|
|
Perform manual vacuuming.
|