summaryrefslogtreecommitdiffstats
path: root/include/jemalloc/internal/jemalloc_preamble.h.in
Commit message (Collapse)AuthorAgeFilesLines
* Define MADV_FREE on our own when needed.Qi Wang2017-10-111-0/+4
| | | | | | On x86 Linux, we define our own MADV_FREE if madvise(2) is available, but no MADV_FREE is detected. This allows the feature to be built in and enabled with runtime detection.
* Fix test/unit/pages.Qi Wang2017-08-111-0/+7
| | | | | | As part of the metadata_thp support, We now have a separate swtich (JEMALLOC_HAVE_MADVISE_HUGE) for MADV_HUGEPAGE availability. Use that instead of JEMALLOC_THP (which doesn't guard pages_huge anymore) in tests.
* Add a logging facility.David T. Goldblatt2017-07-211-0/+11
| | | | | This sets up a hierarchical logging facility, so that we can add logging statements liberally, and turn them on in a fine-grained manner.
* Normalize background thread configuration.Jason Evans2017-06-091-6/+0
| | | | Also fix a compilation error #ifndef JEMALLOC_PTHREAD_CREATE_WRAPPER.
* Add the --disable-thp option to support cross compiling.Jason Evans2017-05-301-7/+7
| | | | This resolves #669.
* Implementing opt.background_thread.Qi Wang2017-05-231-0/+13
| | | | | | | | | | | Added opt.background_thread to enable background threads, which handles purging currently. When enabled, decay ticks will not trigger purging (which will be left to the background threads). We limit the max number of threads to NCPUs. When percpu arena is enabled, set CPU affinity for the background threads as well. The sleep interval of background threads is dynamic and determined by computing number of pages to purge in the future (based on backlog).
* Automatically generate private symbol name mangling macros.Jason Evans2017-05-121-1/+7
| | | | | | | | Rather than using a manually maintained list of internal symbols to drive name mangling, add a compilation phase to automatically extract the list of internal symbols. This resolves #677.
* Replace --disable-munmap with opt.munmap.Jason Evans2017-04-251-7/+0
| | | | | | | | | Control use of munmap(2) via a run-time option rather than a compile-time option (with the same per platform default). The old behavior of --disable-munmap can be achieved with --with-malloc-conf=munmap:false. This partially resolves #580.
* Enable -Wundef, when supported.David Goldblatt2017-04-221-0/+1
| | | | | | This can catch bugs in which one header defines a numeric constant, and another uses it without including the defining header. Undefined preprocessor symbols expand to '0', so that this will compile fine, silently doing the math wrong.
* Remove --enable-ivsalloc.Jason Evans2017-04-211-7/+11
| | | | | | | | | | | | Continue to use ivsalloc() when --enable-debug is specified (and add assertions to guard against 0 size), but stop providing a documented explicit semantics-changing band-aid to dodge undefined behavior in sallocx() and malloc_usable_size(). ivsalloc() remains compiled in, unlike when #211 restored --enable-ivsalloc, and if JEMALLOC_FORCE_IVSALLOC is defined during compilation, sallocx() and malloc_usable_size() will still use ivsalloc(). This partially resolves #580.
* Remove --disable-tcache.Jason Evans2017-04-211-7/+0
| | | | | | | | | | | Simplify configuration by removing the --disable-tcache option, but replace the testing for that configuration with --with-malloc-conf=tcache:false. Fix the thread.arena and thread.tcache.flush mallctls to work correctly if tcache is disabled. This partially resolves #580.
* Move CPP_PROLOGUE and CPP_EPILOGUE to the .cppDavid Goldblatt2017-04-191-12/+0
| | | | This lets us avoid having to specify them in every C file.
* Header refactoring: Split up jemalloc_internal.hDavid Goldblatt2017-04-111-0/+187
This is a biggy. jemalloc_internal.h has been doing multiple jobs for a while now: - The source of system-wide definitions. - The catch-all include file. - The module header file for jemalloc.c This commit splits up this functionality. The system-wide definitions responsibility has moved to jemalloc_preamble.h. The catch-all include file is now jemalloc_internal_includes.h. The module headers for jemalloc.c are now in jemalloc_internal_[externs|inlines|types].h, just as they are for the other modules.