Sure! My point is just that adding contention-free thread-safety to a bump allocator is a no-brainer. It wasn’t designed that way, it just falls out for free. As the mimalloc docs you pointed at say, they still require CAS instructions to guard against a design that doesn’t eliminate contention, but rather makes it rare. That’s inherently more brittle.
But wholly agreed with your larger point:
Yes, the system “as a whole” is what’s important in the end.
Pretty much so. It makes allocation trivial but freeing a puzzle.
Curiously enough, CPython’s pymalloc does pass out blocks in pools via a bump allocator unique to each pool. Freeing isn’t a problem in that context, because a freed block is just added to the front of the pool’s list of free blocks (which are reused ASAP, resorting to the bump allocator only if the free list is empty). But the blocks within a pool are all the same size, so no new fragmentation wrt blocks of other sizes.
Except for very specialized purposes ↩︎