Module rb_sys::tracking_allocator

source ·
Expand description

Support for reporting Rust memory usage to the Ruby GC.

Structs§

  • A guard which adjusts the memory usage reported to the Ruby GC by delta. This allows you to track resources which are invisible to the Rust allocator, such as items that are known to internally use mmap or direct malloc in their implementation.
  • A simple wrapper over std::alloc::System which reports memory usage to the Ruby GC. This gives the GC a more accurate picture of the process’ memory usage so it can make better decisions about when to run.