DragonFly commits List (threaded) for 2010-09
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
git: libc: nmalloc - Add a per-thread magazine layer and a malloc slab magazine.
commit 0bb7d8c82a64940013681cf515d16f3e62eb7e3c
Author: Venkatesh Srinivas <me@endeavour.zapto.org>
Date: Thu Sep 9 03:51:28 2010 -0700
libc: nmalloc - Add a per-thread magazine layer and a malloc slab magazine.
The per-thread magazine layer is based on the Solaris umem/vmem paper; it
creates fixed-sized arrays ('magazines') of buffers and binds them to threads.
Local allocations can often now occur with minimal locking and interference.
The slab magazine is meant to buffer calls calls to mmap when requesting slabs.
In tests with MySQL/sysbench OLTP, it leads to fairly dramatic reductions in
the total number of mmap system calls.
nmalloc now also respects the MALLOC_OPTIONS environment variable:
- The 'U' option generates ktrace entries for all malloc/realloc/free calls
- The 'H' option calls madvise liberally to return pages to the system often
- The 'Z' option zeroes all allocations
This work was developed out-of-tree; the RCS log is on leaf.
Summary of changes:
lib/libc/stdlib/nmalloc.c | 711 ++++++++++++++++++++++++++++++++++++++-------
1 files changed, 599 insertions(+), 112 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/0bb7d8c82a64940013681cf515d16f3e62eb7e3c
--
DragonFly BSD source repository
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]