4 ms·
I think you're misunderstanding the context and the way the allocator works. Take a look at the docs/papers on JEMalloc in general to get a sense of it, but it'
by cbsmith 4y ago
I think you're misunderstanding the context and the way the allocator works. Take a look at the docs/papers on JEMalloc in general to get a sense of it, but it's already doing what you describe (this would be the threads cache that you can tune). This reduces the need for locking in exchange for less memory efficiency; what this post is talking about is efforts to improve the efficiency of the remaining synchronization.
Any thread-safe allocator is constantly fighting to be as efficient as possible with its synchronization, because that allows it reduces the amount of trading memory for concurrency/efficiency.
...and while Chrome's PartitionAlloc is different from Firefox's modified JEMalloc, there's a lot of similarity in how the two allocators try to manage concurrency.