DragonFly commits List (threaded) for 2011-11
git: libc - Bring dmalloc in for x86-64
Author: Matthew Dillon <firstname.lastname@example.org>
Date: Sun Nov 13 09:31:01 2011 -0800
libc - Bring dmalloc in for x86-64
* Bring in a much faster allocator for x86-64. DMalloc is a slab alloctor
with dynamic slab sizing capabilities, allowing slabs to be used for
all allocation sizes. This simplifies the code paths considerably.
* DMalloc is optimized for heavy-use situations but will still retain a
run size similar to the old nmalloc code. The VSZ is going to be quite
a bit bigger, though. The best test is w/mysqld as mysql[d] allocates
and frees memory at a very high rate.
* DMalloc is almost completely lockless. Slabs become owned by threads
which can then manipulate them trivially. Frees can operate on foreign
slabs in a lockless manner. A depot is used primarily as a catch-all
for thread exits.
Written-by: Matthew Dillon
Summary of changes:
lib/libc/stdlib/Makefile.inc | 8 +-
lib/libc/stdlib/dmalloc.c | 1524 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 1531 insertions(+), 1 deletions(-)
create mode 100644 lib/libc/stdlib/dmalloc.c
DragonFly BSD source repository