Crate runmat_gc

Crate runmat_gc 

Source
Expand description

RunMat High-Performance Generational Garbage Collector

A production-quality, thread-safe generational garbage collector designed for high-performance interpreters. Features safe object management with handle-based access instead of raw pointers to avoid undefined behavior.

Re-exports§

pub use allocator::AllocatorStats;
pub use allocator::GenerationalAllocator;
pub use allocator::SizeClass;
pub use barriers::CardTable;
pub use barriers::WriteBarrier;
pub use collector::MarkSweepCollector;
pub use config::GcConfig;
pub use config::GcConfigBuilder;
pub use generations::Generation;
pub use generations::GenerationStats;
pub use generations::GenerationalHeap;
pub use generations::GenerationalHeapStats;
pub use roots::GcRoot;
pub use roots::GlobalRoot;
pub use roots::RootId;
pub use roots::RootScanner;
pub use roots::StackRoot;
pub use roots::VariableArrayRoot;
pub use stats::CollectionEvent;
pub use stats::CollectionType;
pub use stats::GcStats;

Modules§

allocator
Generational allocator for the garbage collector
barriers
Write barriers for generational garbage collection
collector
Garbage collection algorithms
config
Garbage collector configuration
gc_ptr
Garbage collected smart pointers
generations
Generational heap management
roots
GC root scanning and management
stats
Garbage collection statistics and metrics

Macros§

write_barrier
Write barrier macro for convenient insertion into code

Structs§

GcPtr
HighPerformanceGC
High-performance garbage collector with safe handle-based design

Enums§

GcError
Errors that can occur during garbage collection

Traits§

GcFinalizer
A finalizer that runs when a GC-managed Value is collected.

Functions§

gc_add_root
gc_allocate
Global GC functions for easy access
gc_barrier_minor_roots
Get barrier-derived roots for minor GC
gc_collect_major
gc_collect_minor
gc_configure
gc_deref
Helper function to dereference a GcPtr safely (now just uses normal dereferencing)
gc_get_config
gc_record_write
Record a write for GC barriers (approximate old->young tracking)
gc_register_finalizer
Register a finalizer for the provided GC pointer.
gc_register_root
Simplified root registration for backwards compatibility
gc_remove_root
gc_reset_for_test
Reset GC for testing - always available
gc_stats
gc_test_context
Create an isolated test context with clean GC state
gc_unregister_finalizer
Remove any registered finalizer for the provided GC pointer.
gc_unregister_root

Type Aliases§

Result