8 ms·
The audience would be the very few people who actually care about what's going on inside the guts of malloc(). So mostly people writing high performance code a
by dale_glass 4y ago
The audience would be the very few people who actually care about what's going on inside the guts of malloc().
So mostly people writing high performance code and wondering things like how does it perform in threaded code, whether there are optimizations for small allocations, etc. And also very valuable to the very, very few people who might think "I can do better" and contribute an improvement.
Documentation about the deep internals of stuff can be extremely valuable, but since very few people need it, it tends to be a very rare find.
- shepmaster 4y ago> So mostly people writing high performance code I would have assumed those people would be deliberately using another allocator with known/documented/guaranteed qualities instead of whatever ambient allocator was in play at the time. That or avoid allocation as much as possible so that the choice of allocator effectively matters very little. When would using optimizing for specifically glibc’s allocator be maximally beneficial?
- cormacrelf 4y agoSome people who care about high performance code end up writing their own allocator. If you want to do that, you are going to have to read about glibc’s implementation at some point. Understanding general purpose allocators and what tradeoffs they choose is essential if you are looking to make different choices. The same is true if you are trying to choose a different allocator. It surely helps to understand the code you’re benchmarking in order to hear what your benchmarks are telling you.