84c8eefeff
The previous free list implementation, which embedded singly linked lists in available regions, had the unfortunate side effect of causing many cache misses during thread cache fills. Fix this in two places: - arena_run_t: Use a new bitmap implementation to track which regions are available. Furthermore, revert to preferring the lowest available region (as jemalloc did with its old bitmap-based approach). - tcache_t: Move read-only tcache_bin_t metadata into tcache_bin_info_t, and add a contiguous array of pointers to tcache_t in order to track cached objects. This substantially increases the size of tcache_t, but results in much higher data locality for common tcache operations. As a side benefit, it is again possible to efficiently flush the least recently used cached objects, so this change changes flushing from MRU to LRU. The new bitmap implementation uses a multi-level summary approach to make finding the lowest available region very fast. In practice, bitmaps only have one or two levels, though the implementation is general enough to handle extremely large bitmaps, mainly so that large page sizes can still be entertained. Fix tcache_bin_flush_large() to always flush statistics, in the same way that tcache_bin_flush_small() was recently fixed. Use JEMALLOC_DEBUG rather than NDEBUG. Add dassert(), and use it for debug-only asserts. |
||
---|---|---|
.. | ||
bin | ||
doc | ||
include/jemalloc | ||
src | ||
test | ||
autogen.sh | ||
ChangeLog | ||
config.guess | ||
config.stamp.in | ||
config.sub | ||
configure.ac | ||
COPYING | ||
INSTALL | ||
install-sh | ||
Makefile.in | ||
README |
jemalloc is a general-purpose scalable concurrent malloc(3) implementation. This distribution is a stand-alone "portable" implementation that currently targets Linux and Apple OS X. jemalloc is included as the default allocator in the FreeBSD and NetBSD operating systems, and it is used by the Mozilla Firefox web browser on Microsoft Windows-related platforms. Depending on your needs, one of the other divergent versions may suit your needs better than this distribution. The COPYING file contains copyright and licensing information. The INSTALL file contains information on how to configure, build, and install jemalloc. The ChangeLog file contains a brief summary of changes for each release. URL: http://www.canonware.com/jemalloc/