about summary refs log tree commit diff
path: root/malloc/Makefile
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2023-03-29 00:18:40 -0400
committerDJ Delorie <dj@redhat.com>2023-03-29 16:36:03 -0400
commit24cdd6c71debfd10a9f7cb217fe2a2c4c486ed6f (patch)
tree67fb2733a20d3358f82f92f3e976ab1ec8d09be9 /malloc/Makefile
parent998fba01b254be6c1848da4900454a3bc309cb69 (diff)
downloadglibc-24cdd6c71debfd10a9f7cb217fe2a2c4c486ed6f.tar.gz
glibc-24cdd6c71debfd10a9f7cb217fe2a2c4c486ed6f.tar.xz
glibc-24cdd6c71debfd10a9f7cb217fe2a2c4c486ed6f.zip
memalign: Support scanning for aligned chunks.
This patch adds a chunk scanning algorithm to the _int_memalign code
path that reduces heap fragmentation by reusing already aligned chunks
instead of always looking for chunks of larger sizes and splitting
them.  The tcache macros are extended to allow removing a chunk from
the middle of the list.

The goal is to fix the pathological use cases where heaps grow
continuously in workloads that are heavy users of memalign.

Note that tst-memalign-2 checks for tcache operation, which
malloc-check bypasses.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Diffstat (limited to 'malloc/Makefile')
-rw-r--r--malloc/Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/malloc/Makefile b/malloc/Makefile
index 0717df626e..f49675845e 100644
--- a/malloc/Makefile
+++ b/malloc/Makefile
@@ -43,6 +43,7 @@ tests := mallocbug tst-malloc tst-valloc tst-calloc tst-obstack \
 	 tst-tcfree1 tst-tcfree2 tst-tcfree3 \
 	 tst-safe-linking \
 	 tst-mallocalign1 \
+	 tst-memalign-2
 
 tests-static := \
 	 tst-interpose-static-nothread \
@@ -70,7 +71,7 @@ test-srcs = tst-mtrace
 # with MALLOC_CHECK_=3 because they expect a specific failure.
 tests-exclude-malloc-check = tst-malloc-check tst-malloc-usable \
 	tst-mxfast tst-safe-linking \
-	tst-compathooks-off tst-compathooks-on
+	tst-compathooks-off tst-compathooks-on tst-memalign-2
 
 # Run all tests with MALLOC_CHECK_=3
 tests-malloc-check = $(filter-out $(tests-exclude-malloc-check) \