summaryrefslogtreecommitdiffstats
path: root/src/ckh.c
Commit message (Collapse)AuthorAgeFilesLines
* Header refactoring: Pull size helpers out of jemalloc module.David Goldblatt2017-05-311-3/+3
|
* Header refactoring: hash - unify and remove from catchall.David Goldblatt2017-04-251-0/+1
|
* Header refactoring: ckh module - remove from the catchall and unify.David Goldblatt2017-04-241-0/+3
|
* Header refactoring: prng module - remove from the catchall and unify.David Goldblatt2017-04-241-0/+1
|
* Get rid of most of the various inline macros.David Goldblatt2017-04-241-6/+6
|
* Header refactoring: move assert.h out of the catch-allDavid Goldblatt2017-04-191-0/+1
|
* Header refactoring: move util.h out of the catchallDavid Goldblatt2017-04-191-0/+1
|
* Header refactoring: move malloc_io.h out of the catchallDavid Goldblatt2017-04-191-0/+2
|
* Header refactoring: Split up jemalloc_internal.hDavid Goldblatt2017-04-111-1/+2
| | | | | | | | | | | | | | 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.
* Pass dealloc_ctx down free() fast path.Qi Wang2017-04-111-5/+5
| | | | This gets rid of the redundent rtree lookup down fast path.
* Remove extent dereferences from the deallocation fast paths.Jason Evans2017-03-231-10/+5
|
* Replace tabs following #define with spaces.Jason Evans2017-01-211-1/+1
| | | | This resolves #564.
* Remove extraneous parens around return arguments.Jason Evans2017-01-211-25/+25
| | | | This resolves #540.
* Update brace style.Jason Evans2017-01-211-53/+48
| | | | | | | Add braces around single-line blocks, and remove line breaks before function-opening braces. This resolves #537.
* Remove leading blank lines from function bodies.Jason Evans2017-01-131-5/+0
| | | | This resolves #535.
* Fix indentation.Jason Evans2017-01-131-3/+3
|
* Refactor prng to not use 64-bit atomics on 32-bit platforms.Jason Evans2016-11-071-4/+4
| | | | This resolves #495.
* Do not (recursively) allocate within tsd_fetch().Jason Evans2016-10-211-23/+26
| | | | | | | Refactor tsd so that tsdn_fetch() does not trigger allocation, since allocation could cause infinite recursion. This resolves #458.
* Rename huge to large.Jason Evans2016-06-061-3/+3
|
* Implement cache-oblivious support for huge size classes.Jason Evans2016-06-031-2/+3
|
* Refactor rtree to always use base_alloc() for node allocation.Jason Evans2016-06-031-5/+7
|
* Use rtree-based chunk lookups rather than pointer bit twiddling.Jason Evans2016-06-031-5/+5
| | | | | | | | | | | Look up chunk metadata via the radix tree, rather than using CHUNK_ADDR2BASE(). Propagate pointer's containing extent. Minimize extent lookups by doing a single lookup (e.g. in free()) and propagating the pointer's extent into nearly all the functions that may need it.
* Resolve bootstrapping issues when embedded in FreeBSD libc.Jason Evans2016-05-111-21/+21
| | | | | | | | | | | | | 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.
* Fix huge_palloc() regression.Jason Evans2016-05-041-3/+3
| | | | | | | | | | Split arena_choose() into arena_[i]choose() and use arena_ichoose() for arena lookup during internal allocation. This fixes huge_palloc() so that it always succeeds during extent node allocation. This regression was introduced by 66cd953514a18477eb49732e40d5c2ab5f1b12c5 (Do not allocate metadata via non-auto arenas, nor tcaches.).
* Do not allocate metadata via non-auto arenas, nor tcaches.Jason Evans2016-04-221-8/+8
| | | | | This assures that all internally allocated metadata come from the first opt_narenas arenas, i.e. the automatically multiplexed arenas.
* Add JEMALLOC_ALLOC_JUNK and JEMALLOC_FREE_JUNK macrosChris Peterson2016-03-311-1/+1
| | | | | Replace hardcoded 0xa5 and 0x5a junk values with JEMALLOC_ALLOC_JUNK and JEMALLOC_FREE_JUNK macros, respectively.
* Make *allocx() size class overflow behavior defined.Jason Evans2016-02-251-3/+3
| | | | | | | Limit supported size and alignment to HUGE_MAXCLASS, which in turn is now limited to be less than PTRDIFF_MAX. This resolves #278 and #295.
* Silence miscellaneous 64-to-32-bit data loss warnings.Jason Evans2016-02-241-6/+6
|
* Refactor prng* from cpp macros into inline functions.Jason Evans2016-02-201-2/+2
| | | | | Remove 32-bit variant, convert prng64() to prng_lg_range(), and add prng_range().
* Fast-path improvement: reduce # of branches and unnecessary operations.Qi Wang2015-11-101-5/+5
| | | | | | - Combine multiple runtime branches into a single malloc_slow check. - Avoid calling arena_choose / size2index / index2size on fast path. - A few micro optimizations.
* Fix MinGW-related portability issues.Jason Evans2015-07-231-3/+3
| | | | | | | | | | | | | Create and use FMT* macros that are equivalent to the PRI* macros that inttypes.h defines. This allows uniform use of the Unix-specific format specifiers, e.g. "%zu", as well as avoiding Windows-specific definitions of e.g. PRIu64. Add ffs()/ffsl() support for compiling with gcc. Extract compatibility definitions of ENOENT, EINVAL, EAGAIN, EPERM, ENOMEM, and ENORANGE into include/msvc_compat/windows_extra.h and use the file for tests as well as for core jemalloc code.
* Update ckh to support metadata allocation tracking.Jason Evans2015-02-121-9/+11
|
* Implement explicit tcache support.Jason Evans2015-02-101-3/+4
| | | | | | | | | Add the MALLOCX_TCACHE() and MALLOCX_TCACHE_NONE macros, which can be used in conjunction with the *allocx() API. Add the tcache.create, tcache.flush, and tcache.destroy mallctls. This resolves #145.
* Style and spelling fixes.Jason Evans2014-12-091-2/+2
|
* Convert to uniform style: cond == false --> !condJason Evans2014-10-031-5/+5
|
* Convert all tsd variables to reside in a single tsd structure.Jason Evans2014-09-231-18/+20
|
* Fix inline-related macro issues.Jason Evans2013-12-101-6/+6
| | | | | | | | | Add JEMALLOC_INLINE_C and use it instead of JEMALLOC_INLINE in .c files, so that the annotated functions are always static. Remove SFMT's inline-related macros and use jemalloc's instead, so that there's no danger of interactions with jemalloc's definitions that disable inlining for debug builds.
* Use config_* instead of JEMALLOC_*.Jason Evans2013-01-221-3/+2
| | | | Convert a couple of stragglers from JEMALLOC_* to use config_*.
* Update hash from MurmurHash2 to MurmurHash3.Jason Evans2013-01-221-63/+18
| | | | | | Update hash from MurmurHash2 to MurmurHash3, primarily because the latter generates 128 bits in a single call for no extra cost, which simplifies integration with cuckoo hashing.
* Normalize aligned allocation algorithms.Jason Evans2012-04-121-3/+3
| | | | | | | | | | | | | | | Normalize arena_palloc(), chunk_alloc_mmap_slow(), and chunk_recycle_dss() to use the same algorithm for trimming over-allocation. Add the ALIGNMENT_ADDR2BASE(), ALIGNMENT_ADDR2OFFSET(), and ALIGNMENT_CEILING() macros, and use them where appropriate. Remove the run_size_p parameter from sa2u(). Fix a potential deadlock in chunk_recycle_dss() that was introduced by eae269036c9f702d9fa9be497a1a2aa1be13a29e (Add alignment support to chunk_alloc()).
* Rename labels.Jason Evans2012-04-101-8/+8
| | | | | | | Rename labels from FOO to label_foo in order to avoid system macro definitions, in particular OUT and ERROR on mingw. Reported by Mike Hommey.
* Use UINT64_C() rather than LLU for 64-bit constants.Jason Evans2012-03-051-4/+4
|
* Rename prn to prng.Jason Evans2012-03-021-3/+3
| | | | | Rename prn to prng so that Windows doesn't choke when trying to create a file named prn.h.
* Remove magic.Jason Evans2012-02-131-9/+0
| | | | | | Remove structure magic, because 1) it is no longer conditional, and 2) it stopped being very effective at detecting memory corruption several years ago.
* Reduce cpp conditional logic complexity.Jason Evans2012-02-111-9/+8
| | | | | | | | | | | | | | | | | | | | | | Convert configuration-related cpp conditional logic to use static constant variables, e.g.: #ifdef JEMALLOC_DEBUG [...] #endif becomes: if (config_debug) { [...] } The advantage is clearer, more concise code. The main disadvantage is that data structures no longer have conditionally defined fields, so they pay the cost of all fields regardless of whether they are used. In practice, this is only a minor concern; config_stats will go away in an upcoming change, and config_prof is the only other major feature that depends on more than a few special-purpose fields.
* Use LLU suffix for all 64-bit constants.Jason Evans2011-05-221-1/+1
| | | | | | Add the LLU suffix for all 0x... 64-bit constants. Reported by Jakob Blomer.
* Move repo contents in jemalloc/ to top level.Jason Evans2011-04-011-0/+619