3 ms·
There is a ton of YMMV with these things. dlmalloc works fine, and so do other general purpose allocators. My custom allocator is and will always be superior be
by ksk 10y ago
There is a ton of YMMV with these things. dlmalloc works fine, and so do other general purpose allocators. My custom allocator is and will always be superior because it takes advantage of the fact that I only perform allocations from a very very small subset of known sizes, at very specific points. The allocator does next to nothing during dealloc, except at certain times when it can do things in bulk. I've modeled the allocator so it doesn't have to "be prepared" for anything else. I allocate a large chunk of memory which is never released to the OS so I don't ever have to worry about other threads messing up my memory region.