Skip to content

Commit 4d66bc7

Browse files
Docs: Document garbage collector threshold doubling and its memory spike trade-off.
1 parent 011be71 commit 4d66bc7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

compiler/src/modules/vm/types.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,7 @@ impl HeapPool {
501501
}
502502
}
503503

504+
// Garbage collector threshold doubles after each sweep: fewer collections but temporary 2x memory spikes.
504505
self.gc_threshold = (self.live * 2).max(512);
505506
self.alloc_count = 0;
506507
if self.free_list.len() > 65_536 { self.free_list.truncate(65_536); }

0 commit comments

Comments
 (0)