News for hackers. Stuff that matters.
Re:Drop millions of allocations by using a linked list (2015) by scott_s on Friday March 12, 2021 @12:01PM (#26437907)
As someone who worked on memory allocators in a past life: cosign. Size-class based allocation for small objects is how modern memory allocators have worked for a long time now. I'm genuinely baffled by how many people think that the bump-pointer allocation for same-sized objects is unique to garbage collection.
Re:Drop millions of allocations by using a linked list (2015) by pradn on Friday March 12, 2021 @12:18PM (#26438121)
Thanks for confirming this. Do you have an idea of how modern allocators compare with generational GCs on the cleanup / realloc / fragmentation side?
Re:Drop millions of allocations by using a linked list (2015) by scott_s on Sunday March 14, 2021 @11:16AM (#26456073)
No, and that would make a great empirical study. (Maybe there has been one! I should check ISMM over the past decade, someone may have done it already.)

From first principles, the biggest difference is that manual memory allocation can't move live objects around. But manual memory managers do still have the ability to be smart on deallocation, to the point that calling free will sometimes cause things to happen that would be similar in a garbage collector.