3 ms·
Now I'm beginning to think that you are trolling me. Memory allocators within the kernel works exactly the same as those outside of it. But for one stand-alone
by bjourne 9y ago
Now I'm beginning to think that you are trolling me. Memory allocators within the kernel works exactly the same as those outside of it. But for one stand-alone library using balanced trees, look at jemalloc.
- eps 9y agoOkay. "Exactly the same as outside of it." jemalloc uses trees (off the fastpath nonetheless), but hoard doesn't, dlmalloc doesn't, etc. Common sense derived from CS101 on data structures doesn't directly translate to what's happening in the real world. Your opening comment was pure armchair athelitics.
- bjourne 9y agoMost memory managers worth their salt tend to cache commonly used sizes, that's why tree accesses aren't on the fast path. I have now looked at Hoard. It does use std::map which is indeed a red-black tree.