3 ms·
> I believe calling `free()` gives the memory back to the allocator, which is much better than giving it to the OS Having to deal with memory fragmentation in
by MichaelMoser123 3y ago
> I believe calling `free()` gives the memory back to the allocator, which is much better than giving it to the OS
Having to deal with memory fragmentation in long running servers is no fun at all, especially internal fragmentation of pages maintained by slab allocators.
this is not a very common problem, but it is a hard one to deal with.
- pkolaczk 3y agoFragmentation rarely wastes more than 20% memory and 50% is extremely unlikely. But with tracing GC you’re often wasting 4-5x right from the start. Maybe it’s not called fragmentation, but the room needed for the GC to run efficiently is also waste. Plus all the headers in the objects to keep the marking flags also addup.