[PATCH] malloc: Reduce maximum arenas

DJ Delorie dj@redhat.com
Thu Apr 2 16:19:38 GMT 2026


Do we have a sitation where we hit the limit, but didn't need to?
Reading the sources, the number of arenas actually used depends on how
many threads are simultaneously inside the malloc code.  So if you hit
the max, that means you actually had that many threads actually doing
malloc() at the same time...

I mean, I agree that 8 per core is extreme for some machines - by
definition, we shouldn't be able to have more than one thread *running*
in malloc at a time per cpu, but for low-cpu low-ram machines that swap,
8 per core might be reasonable - a thread that's scheduled out shouldn't
block all other malloc'ing threads.



More information about the Libc-alpha mailing list