Subject: Importing jemalloc
To: None <tech-userlevel@netbsd.org>
From: Andrew Doran <ad@netbsd.org>
List: tech-userlevel
Date: 01/21/2007 05:09:03
Hi,
I ported FreeBSD's new malloc code (jemalloc) to NetBSD's libc. The main
advantage this brings is significantly reduced contention for multi-threaded
programs that use malloc heavily.
For single threaded programs, it seems that jemalloc might have lower or
comparable CPU and memory footprints when compared against phkmalloc. There
is a paper at the URL below. If you go up a directory or two, there are more
interesting files.
http://people.freebsd.org/~jasone/jemalloc/bsdcan2006/jemalloc.pdf
FreeBSD has been running with this allocator for quite a while now. After
fixing a bug in lint I can successfully build userland and a kernel on i386.
A build using both of those new builds works fine (heh), and the multi-
threaded tests I have tried seem OK. I'll be doing a few basic tests to
verify that it compares well to phkmalloc on NetBSD when I get a chance.
Any objections to importing this?
Thanks,
Andrew