Add per-thread cache to malloc

System Internals / glibc - DJ Delorie [delorie.com] - 6 July 2017 13:37 EDT

- 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.

d5c3faf Add per-thread cache to malloc
ChangeLog | 28 +++++
INSTALL | 6 +
NEWS | 8 ++
config.make.in | 2 +
configure | 13 ++
configure.ac | 7 ++
elf/dl-tunables.list | 12 ++
malloc/Makefile | 5 +
malloc/arena.c | 11 ++
malloc/malloc.c | 350 +++++++++++++++++++++++++++++++++++++++++++++++++--
manual/install.texi | 6 +
manual/probes.texi | 19 +++
manual/tunables.texi | 32 +++++
13 files changed, 490 insertions(+), 9 deletions(-)

Upstream: sourceware.org


  • Share