| 1 | module main |
| 2 | |
| 3 | #flag -I @VEXEROOT/thirdparty/libgc/include |
| 4 | #include "@VMODROOT/bench/memory/gc_stats.h" |
| 5 | |
| 6 | fn C.vile_memory_gc_no() uint |
| 7 | |
| 8 | // Read a synchronized collector snapshot outside the measured call. Its C-stack |
| 9 | // scratch storage introduces no allocation; GC remains enabled throughout. |
| 10 | fn collections() u64 { |
| 11 | $if gcboehm ? { |
| 12 | return u64(C.vile_memory_gc_no()) |
| 13 | } |
| 14 | return 0 |
| 15 | } |
| 16 |