summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'dev'3.5.0Jason Evans2014-01-22136-3802/+13957
|\
| * Update ChangeLog for 3.5.0.Jason Evans2014-01-221-1/+1
| |
| * Update copyrights.Jason Evans2014-01-221-2/+2
| |
| * Test and fix malloc_printf("%%").Jason Evans2014-01-222-7/+8
| |
| * Remove __FBSDID from rb.h.Jason Evans2014-01-221-4/+0
| |
| * Subvert tail call optimization in backtrace test.Jason Evans2014-01-211-11/+17
| | | | | | | | | | | | | | Re-structure alloc_[01](), which are mutually tail-recursive functions, to do (unnecessary) work post-recursion so that the compiler cannot perform tail call optimization, thus preserving intentionally unique call paths in captured backtraces.
| * Fix unused variable warnings.Jason Evans2014-01-212-7/+3
| |
| * Avoid lazy-lock in a tcache-dependent test.Jason Evans2014-01-211-14/+34
| |
| * Update ChangeLog.Jason Evans2014-01-181-0/+38
| |
| * Add heap profiling tests.Jason Evans2014-01-177-22/+290
| | | | | | | | | | | | Fix a regression in prof_dump_ctx() due to an uninitized variable. This was caused by revision 4f37ef693e3d5903ce07dc0b61c0da320b35e3d9, so no releases are affected.
| * Fix a variable prototype/definition mismatch.Jason Evans2014-01-172-3/+7
| |
| * Fix name mangling for stress tests.Jason Evans2014-01-1713-174/+164
| | | | | | | | | | | | | | | | | | | | | | Fix stress tests such that testlib code uses the jet_ allocator, but test code uses libjemalloc. Generate jemalloc_{rename,mangle}.h, the former because it's needed for the stress test name mangling fix, and the latter for consistency. As an artifact of this change, some (but not all) definitions related to the experimental API are absent from the headers unless the feature is enabled at configure time.
| * Refactor prof_dump() to reduce contention.Jason Evans2014-01-162-172/+278
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor prof_dump() to use a two pass algorithm, and prof_leave() prior to the second pass. This avoids write(2) system calls while holding critical prof resources. Fix prof_dump() to close the dump file descriptor for all relevant error paths. Minimize the size of prof-related static buffers when prof is disabled. This saves roughly 65 KiB of application memory for non-prof builds. Refactor prof_ctx_init() out of prof_lookup_global().
| * Fix warnings and a test failure exposed on CentOS 6.3.Jason Evans2014-01-152-4/+5
| |
| * Refactor prof_lookup() by extracting prof_lookup_global().Jason Evans2014-01-151-82/+79
| |
| * Refactor overly large/complex functions.Jason Evans2014-01-152-383/+462
| | | | | | | | | | | | | | Refactor overly large functions by breaking out helper functions. Refactor overly complex multi-purpose functions into separate more specific functions.
| * Extract profiling code from [re]allocation functions.Jason Evans2014-01-1210-496/+552
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extract profiling code from malloc(), imemalign(), calloc(), realloc(), mallocx(), rallocx(), and xallocx(). This slightly reduces the amount of code compiled into the fast paths, but the primary benefit is the combinatorial complexity reduction. Simplify iralloc[t]() by creating a separate ixalloc() that handles the no-move cases. Further simplify [mrxn]allocx() (and by implication [mrn]allocm()) to make request size overflows due to size class and/or alignment constraints trigger undefined behavior (detected by debug-only assertions). Report ENOMEM rather than EINVAL if an OOM occurs during heap profiling backtrace creation in imemalign(). This bug impacted posix_memalign() and aligned_alloc().
| * Add junk/zero filling unit tests, and fix discovered bugs.Jason Evans2014-01-089-31/+420
| | | | | | | | | | | | Fix growing large reallocation to junk fill new space. Fix huge deallocation to junk fill when munmap is disabled.
| * Add util unit tests, and fix discovered bugs.Jason Evans2014-01-075-30/+416
| | | | | | | | | | | | | | | | | | | | | | | | | | Add unit tests for pow2_ceil(), malloc_strtoumax(), and malloc_snprintf(). Fix numerous bugs in malloc_strotumax() error handling/reporting. These bugs could have caused application-visible issues for some seldom used (0X... and 0... prefixes) or malformed MALLOC_CONF or mallctl() argument strings, but otherwise they had no impact. Fix numerous bugs in malloc_snprintf(). These bugs were not exercised by existing malloc_*printf() calls, so they had no impact.
| * Convert assert() in test code to assert_*().Jason Evans2014-01-041-4/+12
| |
| * Add unit tests for qr, ql, and rb.Jason Evans2014-01-044-3/+789
| |
| * Convert rtree from (void *) to (uint8_t) storage.Jason Evans2014-01-035-55/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | Reduce rtree memory usage by storing booleans (1 byte each) rather than pointers. The rtree code is only used to record whether jemalloc manages a chunk of memory, so there's no need to store pointers in the rtree. Increase rtree node size to 64 KiB in order to reduce tree depth from 13 to 3 on 64-bit systems. The conversion to more compact leaf nodes was enough by itself to make the rtree depth 1 on 32-bit systems; due to the fact that root nodes are smaller than the specified node size if possible, the node size change has no impact on 32-bit systems (assuming default chunk size).
| * Add rtree unit tests.Jason Evans2014-01-036-10/+165
| |
| * Clean up code formatting.Jason Evans2014-01-021-4/+2
| |
| * Fix an uninitialized variable read in xallocx().Jason Evans2013-12-201-0/+3
| |
| * Add stats unit tests.Jason Evans2013-12-202-1/+352
| |
| * Fix a few mallctl() documentation errors.Jason Evans2013-12-202-138/+144
| | | | | | | | Normalize mallctl() order (code and documentation).
| * Add mallctl*() unit tests.Jason Evans2013-12-204-15/+435
| |
| * Remove ENOMEM from the documented set of *mallctl() errors.Jason Evans2013-12-181-6/+0
| | | | | | | | | | | | | | *mallctl() always returns EINVAL and does partial result copying when *oldlenp is to short to hold the requested value, rather than returning ENOMEM. Therefore remove ENOMEM from the documented set of possible errors.
| * Add missing prototypes.Jason Evans2013-12-171-2/+7
| |
| * Add quarantine unit tests.Jason Evans2013-12-177-15/+193
| | | | | | | | | | | | | | | | | | Verify that freed regions are quarantined, and that redzone corruption is detected. Introduce a testing idiom for intercepting/replacing internal functions. In this case the replaced function is ordinarily a static function, but the idiom should work similarly for library-private functions.
| * Fix a typo in a string constant.Jason Evans2013-12-171-1/+1
| |
| * Add hash (MurmurHash3) tests.Jason Evans2013-12-173-4/+170
| | | | | | | | Add hash tests that are based on SMHasher's VerificationTest() function.
| * Add ckh unit tests.Jason Evans2013-12-172-3/+210
| |
| * Add rallocx() test of both alignment and zeroing.Jason Evans2013-12-161-5/+17
| |
| * Finish arena_prof_ctx_set() optimization.Jason Evans2013-12-161-7/+7
| | | | | | | | Delay reading the mapbits until it's unavoidable.
| * Don't junk-fill reallocations unless usize changes.Jason Evans2013-12-163-16/+4
| | | | | | | | | | | | | | | | | | | | | | Don't junk fill reallocations for which the request size is less than the current usable size, but not enough smaller to cause a size class change. Unlike malloc()/calloc()/realloc(), *allocx() contractually treats the full usize as the allocation, so a caller can ask for zeroed memory via mallocx() and a series of rallocx() calls that all specify MALLOCX_ZERO, and be assured that all newly allocated bytes will be zeroed and made available to the application without danger of allocator mutation until the size class decreases enough to cause usize reduction.
| * Optimize arena_prof_ctx_set().Jason Evans2013-12-163-78/+99
| | | | | | | | | | | | Refactor such that arena_prof_ctx_set() receives usize as an argument, and use it to determine whether to handle ptr as a small region, rather than reading the chunk page map.
| * Add zero/align tests for rallocx().Jason Evans2013-12-152-1/+122
| |
| * Fix name mangling issues.Jason Evans2013-12-134-36/+37
| | | | | | | | | | | | | | | | | | Move je_* definitions from jemalloc_macros.h.in to jemalloc_defs.h.in, because only the latter is an autoconf header (#undef substitution occurs). Fix unit tests to use automatic mangling, so that e.g. mallocx is macro-substituted to becom jet_mallocx.
| * Implement the *allocx() API.Jason Evans2013-12-1319-270/+859
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement the *allocx() API, which is a successor to the *allocm() API. The *allocx() functions are slightly simpler to use because they have fewer parameters, they directly return the results of primary interest, and mallocx()/rallocx() avoid the strict aliasing pitfall that allocm()/rallocx() share with posix_memalign(). The following code violates strict aliasing rules: foo_t *foo; allocm((void **)&foo, NULL, 42, 0); whereas the following is safe: foo_t *foo; void *p; allocm(&p, NULL, 42, 0); foo = (foo_t *)p; mallocx() does not have this problem: foo_t *foo = (foo_t *)mallocx(42, 0);
| * Fix a strict aliasing violation.Jason Evans2013-12-121-2/+4
| |
| * Fix a malloc_mutex dependency in mtx.Jason Evans2013-12-121-1/+1
| |
| * Fix a strict aliasing violation.Jason Evans2013-12-121-2/+6
| |
| * Streamline test output.Jason Evans2013-12-122-13/+16
| |
| * Add mq (message queue) to test infrastructure.Jason Evans2013-12-1221-131/+441
| | | | | | | | | | | | | | | | | | Add mtx (mutex) to test infrastructure, in order to avoid bootstrapping complications that would result from directly using malloc_mutex. Rename test infrastructure's thread abstraction from je_thread to thd. Fix some header ordering issues.
| * Clean up SFMT test.Jason Evans2013-12-101-43/+40
| | | | | | | | | | | | | | | | Refactor array declarations to remove some dubious casts. Reduce array size to what is actually used. Extract magic numbers into cpp macro definitions.
| * Fix inline-related macro issues.Jason Evans2013-12-106-65/+43
| | | | | | | | | | | | | | | | | | 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.
| * Silence some unused variable warnings.Jason Evans2013-12-101-4/+4
| |
| * Add probabability distribution utility code.Jason Evans2013-12-1011-48/+731
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add probabability distribution utility code that enables generation of random deviates drawn from normal, Chi-square, and Gamma distributions. Fix format strings in several of the assert_* macros (remove a %s). Clean up header issues; it's critical that system headers are not included after internal definitions potentially do things like: #define inline Fix the build system to incorporate header dependencies for the test library C files.