summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Link against librt for clock_gettime(2) if glibc < 2.17.Jason Evans2016-05-042-12/+5
| | | | | | | Link libjemalloc against librt if clock_gettime(2) is in librt rather than libc, as for versions of glibc prior to 2.17. This resolves #349.
* Fix a typo.Jason Evans2016-05-041-1/+1
|
* Fix huge_palloc() regression.Jason Evans2016-05-049-20/+42
| | | | | | | | | | 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.).
* Update ChangeLog for 4.1.1.Jason Evans2016-05-041-0/+21
|
* Don't test fork() on Windows.Jason Evans2016-05-041-0/+6
|
* Update mallocx() OOM test to deal with smaller hugemax.Jason Evans2016-05-031-10/+19
| | | | | | | | | | | | | Depending on virtual memory resource limits, it is necessary to attempt allocating three maximally sized objects to trigger OOM rather than just two, since the maximum supported size is slightly less than half the total virtual memory address space. This fixes a test failure that was introduced by 0c516a00c4cb28cff55ce0995f756b5aae074c9e (Make *allocx() size class overflow behavior defined.). This resolves #379.
* Fix witness/fork() interactions.Jason Evans2016-04-265-9/+42
| | | | | | Fix witness to clear its list of owned mutexes in the child if platform-specific malloc_mutex code re-initializes mutexes rather than unlocking them.
* Fix fork()-related lock rank ordering reversals.Jason Evans2016-04-2611-40/+184
|
* Use separate arena for chunk tests.Jason Evans2016-04-261-28/+45
| | | | | This assures that side effects of internal allocation don't impact tests.
* Fix arena reset effects on large/huge stats.Jason Evans2016-04-251-5/+24
| | | | | | Reset large curruns to 0 during arena reset. Do not increase huge ndalloc stats during arena reset.
* Fix arena_reset() test to avoid tcache.Jason Evans2016-04-251-10/+9
|
* Fix arena_choose_hard() regression.Jason Evans2016-04-231-1/+1
| | | | | This regression was caused by 66cd953514a18477eb49732e40d5c2ab5f1b12c5 (Do not allocate metadata via non-auto arenas, nor tcaches.).
* Fix degenerate mb_write() compilation error.Jason Evans2016-04-231-3/+3
| | | | This resolves #375.
* Implement the arena.<i>.reset mallctl.Jason Evans2016-04-228-39/+411
| | | | | | | This makes it possible to discard all of an arena's allocations in a single operation. This resolves #146.
* Do not allocate metadata via non-auto arenas, nor tcaches.Jason Evans2016-04-2214-135/+192
| | | | | This assures that all internally allocated metadata come from the first opt_narenas arenas, i.e. the automatically multiplexed arenas.
* Reduce a variable scope.Jason Evans2016-04-221-2/+1
|
* Doc typo fixes.hitstergtd2016-04-181-3/+3
|
* Fix malloc_mutex_assert_[not_]owner() for --enable-lazy-lock case.Jason Evans2016-04-181-2/+2
|
* Update private_symbols.txt.Jason Evans2016-04-183-22/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | Change test-related mangling to simplify symbol filtering. The following commands can be used to detect missing/obsolete symbol mangling, with the caveat that the full set of symbols is based on the union of symbols generated by all configurations, some of which are platform-specific: ./autogen.sh --enable-debug --enable-prof --enable-lazy-lock make all tests nm -a lib/libjemalloc.a src/*.jet.o \ |grep " [TDBCR] " \ |awk '{print $3}' \ |sed -e 's/^\(je_\|jet_\(n_\)\?\)\([a-zA-Z0-9_]*\)/\3/g' \ |LC_COLLATE=C sort -u \ |grep -v \ -e '^\(malloc\|calloc\|posix_memalign\|aligned_alloc\|realloc\|free\)$' \ -e '^\(m\|r\|x\|s\|d\|sd\|n\)allocx$' \ -e '^mallctl\(\|nametomib\|bymib\)$' \ -e '^malloc_\(stats_print\|usable_size\|message\)$' \ -e '^\(memalign\|valloc\)$' \ -e '^__\(malloc\|memalign\|realloc\|free\)_hook$' \ -e '^pthread_create$' \ > /tmp/private_symbols.txt
* Update private_symbols.txtRajat Goel2016-04-181-0/+4
| | | Add 4 missing symbols
* Fix style nits.Jason Evans2016-04-175-6/+6
|
* Fix malloc_mutex_[un]lock() to conditionally check witness.Jason Evans2016-04-172-12/+2
| | | | Also remove tautological cassert(config_debug) calls.
* Convert base_mtx locking protocol comments to assertions.Jason Evans2016-04-171-10/+12
|
* s/MALLOC_MUTEX_RANK_OMIT/WITNESS_RANK_OMIT/Jason Evans2016-04-141-1/+1
| | | | | | | | This fixes a compilation error caused by b2c0d6322d2307458ae2b28545f8a5c9903d7ef5 (Add witness, a simple online locking validator.). This resolves #375.
* Fix a compilation error.Jason Evans2016-04-141-2/+2
| | | | | | Fix a compilation error that occurs if Valgrind is not enabled. This regression was caused by b2c0d6322d2307458ae2b28545f8a5c9903d7ef5 (Add witness, a simple online locking validator.).
* Add witness, a simple online locking validator.Jason Evans2016-04-1433-1274/+2090
| | | | This resolves #358.
* Fix a style nit.Jason Evans2016-04-131-1/+2
|
* Fix more 64-to-32 conversion warnings.Jason Evans2016-04-122-11/+11
|
* Fix 64-to-32 conversion warnings in 32-bit moderustyx2016-04-121-11/+15
|
* Cleanup MSVC project, embed PDB data inside static .librustyx2016-04-122-14/+11
|
* Fix malloc_stats_print() to print correct opt.narenas value.Jason Evans2016-04-121-1/+1
| | | | | This regression was caused by 8f683b94a751c65af8f9fa25970ccf2917b96bb8 (Make opt_narenas unsigned rather than size_t.).
* Simplify RTREE_HEIGHT_MAX definition.Jason Evans2016-04-111-29/+4
| | | | | Use 1U rather than ZU(1) in macro definitions, so that the preprocessor can evaluate the resulting expressions.
* Support --with-lg-page values larger than actual page size.Jason Evans2016-04-114-6/+6
| | | | | | | | | | | | | | During over-allocation in preparation for creating aligned mappings, allocate one more page than necessary if PAGE is the actual page size, so that trimming still succeeds even if the system returns a mapping that has less than PAGE alignment. This allows compiling with e.g. 64 KiB "pages" on systems that actually use 4 KiB pages. Note that for e.g. --with-lg-page=21, it is also necessary to increase the chunk size (e.g. --with-malloc-conf=lg_chunk:22) so that there are at least two "pages" per chunk. In practice this isn't a particularly compelling configuration because so much (unusable) virtual memory is dedicated to chunk headers.
* Clean up char vs. uint8_t in junk filling code.Jason Evans2016-04-113-17/+19
| | | | Consistently use uint8_t rather than char for junk filling code.
* Refactor/fix ph.Jason Evans2016-04-118-337/+615
| | | | | | | | | | | | | | | | | | | | | Refactor ph to support configurable comparison functions. Use a cpp macro code generation form equivalent to the rb macros so that pairing heaps can be used for both run heaps and chunk heaps. Remove per node parent pointers, and instead use leftmost siblings' prev pointers to track parents. Fix multi-pass sibling merging to iterate over intermediate results using a FIFO, rather than a LIFO. Use this fixed sibling merging implementation for both merge phases of the auxiliary twopass algorithm (first merging the aux list, then replacing the root with its merged children). This fixes both degenerate merge behavior and the potential for deep recursion. This regression was introduced by 6bafa6678fc36483e638f1c3a0a9bf79fb89bfc9 (Pairing heap). This resolves #371.
* Reduce differences between alternative bitmap implementations.Jason Evans2016-04-062-8/+5
|
* Fix bitmap_sfu() regression.Jason Evans2016-04-061-1/+1
| | | | | | | | | | | | Fix bitmap_sfu() to shift by LG_BITMAP_GROUP_NBITS rather than hard-coded 6 when using linear (non-USE_TREE) bitmap search. In practice this affects only 64-bit systems for which sizeof(long) is not 8 (i.e. Windows), since USE_TREE is defined for 32-bit systems. This regression was caused by b8823ab02607d6f03febd32ac504bb6188c54047 (Use linear scan for small bitmaps). This resolves #368.
* Fix a compilation warning in the ph test code.Jason Evans2016-04-051-20/+1
|
* Update implementation details docs re: PTRDIFF_MAX.Jason Evans2016-03-311-3/+11
| | | | | | | Document that the maximum size class is limited by PTRDIFF_MAX, rather than the full address space. This reflects changes that were part of 0c516a00c4cb28cff55ce0995f756b5aae074c9e (Make *allocx() size class overflow behavior defined.).
* Add JEMALLOC_ALLOC_JUNK and JEMALLOC_FREE_JUNK macrosChris Peterson2016-03-317-32/+40
| | | | | Replace hardcoded 0xa5 and 0x5a junk values with JEMALLOC_ALLOC_JUNK and JEMALLOC_FREE_JUNK macros, respectively.
* Update a comment.Jason Evans2016-03-311-2/+2
|
* Fix potential chunk leaks.Jason Evans2016-03-315-51/+26
| | | | | | | | | | | | Move chunk_dalloc_arena()'s implementation into chunk_dalloc_wrapper(), so that if the dalloc hook fails, proper decommit/purge/retain cascading occurs. This fixes three potential chunk leaks on OOM paths, one during dss-based chunk allocation, one during chunk header commit (currently relevant only on Windows), and one during rtree write (e.g. if rtree node allocation fails). Merge chunk_purge_arena() into chunk_purge_default() (refactor, no change to functionality).
* Fix -Wunreachable-code warning in malloc_vsnprintf().Chris Peterson2016-03-271-2/+2
| | | | | | | | | | | Variables s and slen are declared inside a switch statement, but outside a case scope. clang reports these variable definitions as "unreachable", though this is not really meaningful in this case. This is the only -Wunreachable-code warning in jemalloc. src/util.c:501:5 [-Wunreachable-code] code will never be executed This resolves #364.
* Remove unused arenas_extend() function declaration.Chris Peterson2016-03-261-1/+0
| | | | | | The arenas_extend() function was renamed to arenas_init() in commit 8bb3198f72fc7587dc93527f9f19fb5be52fa553, but its function declaration was not removed from jemalloc_internal.h.in.
* Use abort() for fallback implementations of unreachable().Jason Evans2016-03-241-2/+2
|
* Fix MSVC projectrustyx2016-03-242-0/+8
|
* Avoid blindly enabling assertions for header code when testing.Jason Evans2016-03-231-33/+45
| | | | | | Restructure the test program master header to avoid blindly enabling assertions. Prior to this change, assertion code in e.g. arena.h was always enabled for tests, which could skew performance-related testing.
* Constify various internal arena APIs.Jason Evans2016-03-234-73/+111
|
* Code formatting fixes.Jason Evans2016-03-232-2/+4
|
* Always inline performance-critical rtree operations.Jason Evans2016-03-231-9/+10
|