From d5c3fafc4307c9b7a4c7d5cb381fcdbfad340bcc Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Thu, 6 Jul 2017 13:37:30 -0400 Subject: Add per-thread cache to malloc * config.make.in: Enable experimental malloc option. * configure.ac: Likewise. * configure: Regenerate. * manual/install.texi: Document it. * INSTALL: Regenerate. * malloc/Makefile: Likewise. * malloc/malloc.c: Add per-thread cache (tcache). (tcache_put): New. (tcache_get): New. (tcache_thread_freeres): New. (tcache_init): New. (__libc_malloc): Use cached chunks if available. (__libc_free): Initialize tcache if needed. (__libc_realloc): Likewise. (__libc_calloc): Likewise. (_int_malloc): Prefill tcache when appropriate. (_int_free): Likewise. (do_set_tcache_max): New. (do_set_tcache_count): New. (do_set_tcache_unsorted_limit): New. * manual/probes.texi: Document new probes. * malloc/arena.c: Add new tcache tunables. * elf/dl-tunables.list: Likewise. * manual/tunables.texi: Document them. * NEWS: Mention the per-thread cache. --- elf/dl-tunables.list | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'elf') diff --git a/elf/dl-tunables.list b/elf/dl-tunables.list index df4f9622b4..c188c6ad52 100644 --- a/elf/dl-tunables.list +++ b/elf/dl-tunables.list @@ -76,6 +76,18 @@ glibc { minval: 1 security_level: SXID_IGNORE } + tcache_max { + type: SIZE_T + security_level: SXID_ERASE + } + tcache_count { + type: SIZE_T + security_level: SXID_ERASE + } + tcache_unsorted_limit { + type: SIZE_T + security_level: SXID_ERASE + } } tune { hwcap_mask { -- cgit v1.2.3