libc - Bring dmalloc in for x86-64
authorMatthew Dillon <dillon@apollo.backplane.com>
Sun, 13 Nov 2011 17:31:01 +0000 (09:31 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 13 Nov 2011 17:31:01 +0000 (09:31 -0800)
commitff10d9548f6b395b5e9c0485daa45a3b236c1572
tree9150a2c8bcf2c77982b712c64c3f463bb105178b
parent945dadfd0a47b082487e1c3f5dee78ee86df4451
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
lib/libc/stdlib/Makefile.inc
lib/libc/stdlib/dmalloc.c [new file with mode: 0644]