Files
glibc/malloc
Wilco Dijkstra 2e8a940df1 malloc: Avoid accessing /sys/kernel/mm files
On AArch64 malloc always checks /sys/kernel/mm/transparent_hugepage/enabled to
set the THP mode.  However this check is quite expensive and the file may not
be accessible in containers. If DEFAULT_THP_PAGESIZE is non-zero, use
malloc_thp_mode_madvise so that we take advantage of THP in all cases.  Since
madvise is a fast systemcall, it adds only a small overhead compared to the
cost of mmap and populating the pages.

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
2026-03-04 14:21:40 +00:00
..
2026-03-04 09:04:14 +00:00