Conversation

Holy shit mallocng is doing something right. I'm used to mutt growing to over 120 MB and sticking there forever after opening large folders...
2
11
Replying to
Have you tried using it with a web browser and notoriously resource-hungry pages? I remember the people behind the Mesh allocator having good luck with Firefox?
1
Replying to and
Yes, it probably would for performance. I'm not sure how to compare memory usage though. The interesting thing for a large app is not initial usage but non-leaking (non-growth-over-time, return-to-previous-usage after closing stuff).
1
2
Reducing the working set of pages by avoiding fragmentation and metadata overhead improves performance too. Not only frees up memory for caching but reduces TLB pressure. For small allocations, lower metadata overhead and better packing together improves usage of the cache.
2
1
Similarly, making more efficient use of cache by having everything nicely packed together tends to be ignored. I don't like the approach of layering on caches to try hiding the costs of a less efficient underlying decision in common cases. The wasted memory hurts performance.
1
I do think thread caches make sense for a performance-oriented allocator not caring about hardening but ONLY for amortizing the cost of locking. They should be tiny to avoid waste and latency spikes, and using arrays is nicer than free lists to avoid touching cold allocations.
1
Show replies