pub fn live_bytes_in_last_gc<VM: VMBinding>(
mmtk: &MMTK<VM>,
) -> HashMap<&'static str, LiveBytesStats>
Expand description
Return a hash map for live bytes statistics in the last GC for each space.
MMTk usually accounts for memory in pages by each space.
This is a special method that we count the size of every live object in a GC, and sum up the total bytes.
We provide this method so users can use crate::LiveBytesStats
to know if
the space is fragmented.
The value returned by this method is only updated when we finish tracing in a GC. A recommended timing
to call this method is at the end of a GC (e.g. when the runtime is about to resume threads).