summaryrefslogtreecommitdiffstats
path: root/include/jemalloc/jemalloc.h.in
Commit message (Collapse)AuthorAgeFilesLines
* Refactor to support more varied testing.Jason Evans2013-12-041-157/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor the test harness to support three types of tests: - unit: White box unit tests. These tests have full access to all internal jemalloc library symbols. Though in actuality all symbols are prefixed by jet_, macro-based name mangling abstracts this away from test code. - integration: Black box integration tests. These tests link with the installable shared jemalloc library, and with the exception of some utility code and configure-generated macro definitions, they have no access to jemalloc internals. - stress: Black box stress tests. These tests link with the installable shared jemalloc library, as well as with an internal allocator with symbols prefixed by jet_ (same as for unit tests) that can be used to allocate data structures that are internal to the test code. Move existing tests into test/{unit,integration}/ as appropriate. Split out internal parts of jemalloc_defs.h.in and put them in jemalloc_internal_defs.h.in. This reduces internals exposure to applications that #include <jemalloc/jemalloc.h>. Refactor jemalloc.h header generation so that a single header file results, and the prototypes can be used to generate jet_ prototypes for tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in, jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and use a shell script to generate a unified jemalloc.h at configure time. Change the default private namespace prefix from "" to "je_". Add missing private namespace mangling. Remove hard-coded private_namespace.h. Instead generate it and private_unnamespace.h from private_symbols.txt. Use similar logic for public symbols, which aids in name mangling for jet_ symbols. Add test_warn() and test_fail(). Replace existing exit(1) calls with test_fail() calls.
* Add arena-specific and selective dss allocation.Jason Evans2012-10-131-0/+2
| | | | | | | | | | | | | | | | | | | Add the "arenas.extend" mallctl, so that it is possible to create new arenas that are outside the set that jemalloc automatically multiplexes threads onto. Add the ALLOCM_ARENA() flag for {,r,d}allocm(), so that it is possible to explicitly allocate from a particular arena. Add the "opt.dss" mallctl, which controls the default precedence of dss allocation relative to mmap allocation. Add the "arena.<i>.dss" mallctl, which makes it possible to set the default dss precedence on a per arena or global basis. Add the "arena.<i>.purge" mallctl, which obsoletes "arenas.purge". Add the "stats.arenas.<i>.dss" mallctl.
* Drop const from malloc_usable_size() argument on Linux.Jason Evans2012-10-091-1/+2
| | | | | Drop const from malloc_usable_size() argument on Linux, in order to match the prototype in Linux's malloc.h.
* Export je_memalign and je_vallocMike Hommey2012-05-091-0/+9
| | | | | | da99e31 removed attributes on je_memalign and je_valloc, while they didn't have a definition in the jemalloc.h header, thus making them non-exported. Export them again, by defining them in the jemalloc.h header.
* Replace JEMALLOC_ATTR with various different macros when it makes senseMike Hommey2012-05-011-22/+27
| | | | | | Theses newly added macros will be used to implement the equivalent under MSVC. Also, move the definitions to headers, where they make more sense, and for some, are even more useful there (e.g. malloc).
* Revert "Use ffsl() in ALLOCM_ALIGN()."Jason Evans2012-04-041-1/+6
| | | | | | | | This reverts commit 722b370399fd6734de6781285ce9a0cffd547bdd. Unfortunately, glibc requires _GNU_SOURCE to be defined before including string.h, but there is no reliable way to get the prototype within jemalloc.h unless _GNU_SOURCE was already defined.
* Use ffsl() in ALLOCM_ALIGN().Jason Evans2012-04-021-6/+1
| | | | | | Use ffsl() rather than ffs() plus bitshifting in ALLOCM_ALIGN(). The original rational for using ffs() was portability, but the bitmap code has since induced a hard dependency on ffsl().
* Implement aligned_alloc().Jason Evans2012-03-131-0/+3
| | | | | | | | Implement aligned_alloc(), which was added in the C11 standard. The function is weakly specified to the point that a minimally compliant implementation would be painful to use (size must be an integral multiple of alignment!), which in practice makes posix_memalign() a safer choice.
* Add the --disable-experimental option.Jason Evans2012-03-031-0/+8
|
* Reorder macros.Jason Evans2012-03-021-4/+4
|
* Add --with-mangling.Jason Evans2012-03-021-24/+86
| | | | | | | | | | Add the --with-mangling configure option, which can be used to specify name mangling on a per public symbol basis that takes precedence over --with-jemalloc-prefix. Expose the memalign() and valloc() overrides even if --with-jemalloc-prefix is specified. This change does no real harm, and simplifies the code.
* Add nallocm().Jason Evans2012-02-291-0/+1
| | | | | | | Add nallocm(), which computes the real allocation size that would result from the corresponding allocm() call. nallocm() is a functional superset of OS X's malloc_good_size(), in that it takes alignment constraints into account.
* Move repo contents in jemalloc/ to top level.Jason Evans2011-04-011-0/+66