3 ms·
I get that it’s well intentioned but I wish folks stopped talking about the buddy allocator. It’s so obsolete. It’s not the fastest and it sure has some of the
by pizlonator 8y ago
I get that it’s well intentioned but I wish folks stopped talking about the buddy allocator. It’s so obsolete. It’s not the fastest and it sure has some of the worst fragmentation due to very imprecise sizing.
- wuxb 8y agoI wish my professors talked more about their opinions on these textbook techniques, especially like you said that some are not that great so it belongs to a history lesson rather than something that you should get your hands on.
- twtw 8y agoCan something be obsolete if it is still extremely widely used? IIRC, Linux and FreeBSD both use a buddy allocator for physical memory, and I'm pretty sure it is used (in addition to other allocators) in jemalloc as well.
- pcwalton 8y agoI don't think jemalloc uses any buddy allocators. It's a segregated free list allocator, like most C mallocs and tenured generation allocators.
- pcwalton 8y agoI agree that buddy allocators are bad, though they're charmingly simple. In any case, the glossary is up front about their disadvantages: https://www.memorymanagement.org/glossary/b.html#term-buddy-system https://www.memorymanagement.org/glossary/b.html#term-buddy-...