perf: GC 字节账目补齐 + is_epoch_ptr O(1) + 分配热路径触发

This commit is contained in:
2026-08-22 08:10:32 +08:00
parent 95155ce450
commit 469ef7543b
17 changed files with 369 additions and 78 deletions
+4
View File
@@ -98,6 +98,8 @@ impl Vm {
session_cell_ptrs: std::cell::RefCell::new(Vec::new()),
session_bytes_allocated: 0,
string_gc_watermark: gc_threshold,
gc_threshold_cached: gc_threshold,
gc_watermark: gc_threshold,
forwarding: std::collections::HashMap::with_hasher(rustc_hash::FxBuildHasher),
},
symbols: SymbolState {
@@ -202,6 +204,8 @@ impl Vm {
session_cell_ptrs: std::cell::RefCell::new(Vec::new()),
session_bytes_allocated: 0,
string_gc_watermark: gc_threshold,
gc_threshold_cached: gc_threshold,
gc_watermark: gc_threshold,
forwarding: std::collections::HashMap::with_hasher(rustc_hash::FxBuildHasher),
},
symbols: SymbolState {