Re:Understanding Glibc Malloc
by shepmaster on Saturday March 25, 2023 @08:57AM
(#35302210)
> 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?
Re:Understanding Glibc Malloc
by cormacrelf on Saturday March 25, 2023 @09:07AM
(#35302272)
Some 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.
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.