6 ms·
> actually working out when a GC sweep will run is so non-trivial the only way to actually work it out is to run the program and watch it happen, Which is the
by devbent 3y ago
> actually working out when a GC sweep will run is so non-trivial the only way to actually work it out is to run the program and watch it happen,
Which is the case for memory fragmentation without a GC.
A naively written program in C++ will, if left to run long enough, eventually fragment memory so much that allocations start to fail.
But before then you'll have "non-deterministic" behavior of the allocator jumping around the heap trying to fulfill allocation requests.