Re:Testing Memory Allocators: ptmalloc2 vs. tcmalloc vs. hoa...
by kev009 on Thursday July 05, 2018 @02:08AM
(#17461169)
Yep, this two layer approach is also desirable since in userspace you aren't context switching to the kernel all the time and can make some assumptions to avoid certain locking and external fragmentation with the kmem. Short lived allocs are really cheap coming out of i.e. jemalloc arenas and that is important for a lot of programming ergonomics.
> and it can return overallocated (yet unused) memory which custom allocators cannot.
These allocators allocate memory out of buffers they've gotten from the kernel, so overallocation is very much possible depending on your kernel config.