summaryrefslogtreecommitdiffstats
path: root/src/zone.c
Commit message (Collapse)AuthorAgeFilesLines
* Resolve bootstrapping issues when embedded in FreeBSD libc.Jason Evans2016-05-111-4/+4
| | | | | | | | | | | | | b2c0d6322d2307458ae2b28545f8a5c9903d7ef5 (Add witness, a simple online locking validator.) caused a broad propagation of tsd throughout the internal API, but tsd_fetch() was designed to fail prior to tsd bootstrapping. Fix this by splitting tsd_t into non-nullable tsd_t and nullable tsdn_t, and modifying all internal APIs that do not critically rely on tsd to take nullable pointers. Furthermore, add the tsd_booted_get() function so that tsdn_fetch() can probe whether tsd bootstrapping is complete and return NULL if not. All dangerous conversions of nullable pointers are tsdn_tsd() calls that assert-fail on invalid conversion.
* Add witness, a simple online locking validator.Jason Evans2016-04-141-4/+4
| | | | This resolves #358.
* Reuse previously computed valueDmitry-Me2015-11-121-2/+4
|
* Style and spelling fixes.Jason Evans2014-12-091-1/+1
|
* Whitespace cleanups.Jason Evans2014-09-051-7/+7
|
* Ensure the default purgeable zone is after the default zone on OS XMike Hommey2014-06-101-9/+25
|
* Prefer not_reached() over assert(false) where appropriate.Jason Evans2013-10-211-1/+1
|
* Don't register jemalloc's zone allocator if something else already replaced ↵Mike Hommey2012-11-071-1/+11
| | | | the system default zone
* Implement Valgrind support, redzones, and quarantine.Jason Evans2012-04-111-5/+5
| | | | | | | | | | | | | Implement Valgrind support, as well as the redzone and quarantine features, which help Valgrind detect memory errors. Redzones are only implemented for small objects because the changes necessary to support redzones around large and huge objects are complicated by in-place reallocation, to the point that it isn't clear that the maintenance burden is worth the incremental improvement to Valgrind support. Merge arena_salloc() and arena_salloc_demote(). Refactor i[v]salloc() to expose the 'demote' option.
* Clean up *PAGE* macros.Jason Evans2012-04-021-1/+1
| | | | | | | | | | | s/PAGE_SHIFT/LG_PAGE/g and s/PAGE_SIZE/PAGE/g. Remove remnants of the dynamic-page-shift code. Rename the "arenas.pagesize" mallctl to "arenas.page". Remove the "arenas.chunksize" mallctl, which is redundant with "opt.lg_chunk".
* Move last bit of zone initialization in zone.c, and lazy-initializeMike Hommey2012-04-021-0/+1
|
* Avoid crashes when system libraries use the purgeable zone allocatorMike Hommey2012-03-301-5/+26
|
* Move zone registration to zone.cMike Hommey2012-03-301-3/+19
|
* Make zone_{free, realloc, free_definite_size} fallback to the system ↵Mike Hommey2012-03-261-4/+17
| | | | | | | | | | | | allocator if they are called with a pointer that jemalloc didn't allocate It turns out some OSX system libraries (like CoreGraphics on 10.6) like to call malloc_zone_* functions, but giving them pointers that weren't allocated with the zone they are using. Possibly, they do malloc_zone_malloc(malloc_default_zone()) before we register the jemalloc zone, and malloc_zone_realloc(malloc_default_zone()) after. malloc_default_zone() returning a different value in both cases.
* Improve zone support for OSXMike Hommey2012-03-201-168/+23
| | | | | | | I tested a build from 10.7 run on 10.7 and 10.6, and a build from 10.6 run on 10.6. The AC_COMPILE_IFELSE limbo is to avoid running a program during configure, which presumably makes it work when cross compiling for iOS.
* Unbreak mac after commit 4e2e3ddMike Hommey2012-03-201-1/+1
|
* Add --with-mangling.Jason Evans2012-03-021-13/+13
| | | | | | | | | | 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.
* Simplify zone_good_size().Jason Evans2012-02-291-15/+3
| | | | | | Simplify zone_good_size() to avoid memory allocation. Submitted by Mike Hommey.
* Move repo contents in jemalloc/ to top level.Jason Evans2011-04-011-0/+354