aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilco Dijkstra <wilco.dijkstra@arm.com>2025-08-04 17:31:52 +0000
committerWilco Dijkstra <wilco.dijkstra@arm.com>2025-08-04 17:31:52 +0000
commitb6f8c0031c6619963cff53b161c033fc247f4fd9 (patch)
treedc2520f1eb3c5e959533e10d08cf2f849cc8be08
parent011ef5b18ca6935c2a9537f7cf4a824b1492eb73 (diff)
downloadglibc-b6f8c0031c6619963cff53b161c033fc247f4fd9.zip
glibc-b6f8c0031c6619963cff53b161c033fc247f4fd9.tar.gz
glibc-b6f8c0031c6619963cff53b161c033fc247f4fd9.tar.bz2
Revert "Enable THP on arenas"
This reverts commit 77d3e739360ebb49bae6ecfd4181e4e1692f6362.
-rw-r--r--malloc/arena.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/malloc/arena.c b/malloc/arena.c
index 91a4f36..90c526f 100644
--- a/malloc/arena.c
+++ b/malloc/arena.c
@@ -444,13 +444,10 @@ alloc_new_heap (size_t size, size_t top_pad, size_t pagesize,
static heap_info *
new_heap (size_t size, size_t top_pad)
{
- bool use_hugepage = mp_.hp_pagesize != 0;
- size_t pagesize = use_hugepage ? mp_.hp_pagesize : mp_.thp_pagesize;
-
- if (pagesize != 0 && pagesize <= heap_max_size ())
+ if (mp_.hp_pagesize != 0 && mp_.hp_pagesize <= heap_max_size ())
{
- heap_info *h = alloc_new_heap (size, top_pad, pagesize,
- use_hugepage ? mp_.hp_flags : 0);
+ heap_info *h = alloc_new_heap (size, top_pad, mp_.hp_pagesize,
+ mp_.hp_flags);
if (h != NULL)
return h;
}
@@ -482,8 +479,6 @@ grow_heap (heap_info *h, long diff)
h->mprotect_size = new_size;
}
- madvise_thp (h, new_size);
-
h->size = new_size;
LIBC_PROBE (memory_heap_more, 2, h, h->size);
return 0;