[PATCH] elf: Fix elf/tst-decorate-maps on aarch64 after 321e1fc73f
Wilco Dijkstra
Wilco.Dijkstra@arm.com
Thu Dec 18 17:23:07 GMT 2025
Hi Dev/Adhemerval,
> Ah I get you now. So basically a malloc(256KB) gets satisfied from the brk heap itself
> because it is getting extended by 2MB straightaway. Thanks.
This is actually an interesting question - should the mmap threshold setting mean
that all larger sizes will always use mmap, or only if there is not enough free space?
Also this threshold is dynamically adjusted in that a huge mmap will force both
mmap_threshold and trim_threshold to the size of that mmap (up to 32MB).
This results in random behaviour since these variables are global and any thread
can influence other threads this way by using a huge mmap.
This doesn't seem like intentional or useful behavior - they should have more
reasonable default settings and never change dynamically.
Cheers,
Wilco
More information about the Libc-alpha
mailing list