Conversation

It's all fine with server and command-line applications and on Android, but GTK+ and Qt applications often take a ridiculously long time to load because applications feel like reallocating 32 bytes to 32 MiB via realloc loops in increments of 32 bytes. Krita is particularly bad.
2
8
Replying to
Please, let's work together to get the offenders fixed upstream. This affects musl's current and future allocators too and we're not going to penalize reasonable apps with ridiculous memory bloat to facilitate these app bugs.
1
1
Replying to and
So, for slab allocations, the problem doesn't matter because even growing by 1 byte in a loop only results in 4 copies per doubling in size. It played no part in choosing those size classes, but they do help with it. The issue is once those end, and it switches 4k granularity.
1
Replying to and
So what I plan to do is adding the same kind of rounding for large allocations, via a one to two line calculation, which will result in using up to ~20% extra virtual memory in the worst case for large allocations, but not higher memory usage. Already use up to 2x VM for guards.
1
Show replies