Crate pgc

Source
Expand description

Simple mark&sweep garbage collector that can work in multiple threads (multithreaded collection support is still W.I.P).

Internally this GC implementation uses mimalloc as fast memory allocator. Marking is done in sync or in parallel. Parallel marking is usually slower,but the idea is that the longer you wait before doing GC work, the more time it will take to do it once you get around to it. So if you do a bit of the work regularly, you are less likely to experience stop-the-world pauses.

Modules§

pthread

Structs§

AllNumbers
Collector
Gc
A garbage-collected pointer type
GcPtr
Rooted
An structure to hold root object alive until end of it’s live. Internally this structure uses reference counting.
Terminator
Timer

Traits§

GcObject

Functions§

add_root
disable_gc_stats
disable_incremental
enable_gc_stats
enable_incremental
gc_collect
gc_mark_parallel
Trigger parallel marking to mark objects.
gc_summary
gc_total_allocated
in_ms
is_root
remove_root
timestamp