summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * Fix locking in arena_dirty_count().Jason Evans2017-01-071-1/+3
| | | | | | | | This was a latent bug, since the function is (intentionally) not used.
| * Fix allocated_large stats with respect to sampled small allocations.Jason Evans2017-01-071-6/+18
| |
| * Fix arena_large_reset_stats_cancel().Jason Evans2017-01-051-1/+1
| | | | | | | | | | Decrement ndalloc_large rather than incrementing, in order to cancel out the increment in arena_large_dalloc_stats_update().
| * Implement per arena base allocators.Jason Evans2016-12-2718-323/+939
| | | | | | | | | | | | | | | | | | | | | | | | | | Add/rename related mallctls: - Add stats.arenas.<i>.base . - Rename stats.arenas.<i>.metadata to stats.arenas.<i>.internal . - Add stats.arenas.<i>.resident . Modify the arenas.extend mallctl to take an optional (extent_hooks_t *) argument so that it is possible for all base allocations to be serviced by the specified extent hooks. This resolves #463.
| * Refactor purging and splitting/merging.Jason Evans2016-12-2711-84/+258
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Split purging into lazy and forced variants. Use the forced variant for zeroing dss. Add support for NULL function pointers as an opt-out mechanism for the dalloc, commit, decommit, purge_lazy, purge_forced, split, and merge fields of extent_hooks_t. Add short-circuiting checks in large_ralloc_no_move_{shrink,expand}() so that no attempt is made if splitting/merging is not supported. This resolves #268.
| * Rename arena_decay_t's ndirty to nunpurged.Jason Evans2016-12-272-5/+5
| |
| * Use exponential series to size extents.Jason Evans2016-12-273-31/+198
| | | | | | | | | | | | | | | | | | | | If virtual memory is retained, allocate extents such that their sizes form an exponentially growing series. This limits the number of disjoint virtual memory ranges so that extent merging can be effective even if multiple arenas' extent allocation requests are highly interleaved. This resolves #462.
| * Add huge page configuration and pages_[no}huge().Jason Evans2016-12-279-6/+141
| | | | | | | | | | | | | | | | Add the --with-lg-hugepage configure option, but automatically configure LG_HUGEPAGE even if it isn't specified. Add the pages_[no]huge() functions, which toggle huge page state via madvise(..., MADV_[NO]HUGEPAGE) calls.
| * Fix JSON-mode output for !config_stats and/or !config_prof cases.Jason Evans2016-12-231-10/+11
| | | | | | | | | | | | | | These bugs were introduced by 0ba5b9b6189e16a983d8922d8c5cb6ab421906e8 (Add "J" (JSON) support to malloc_stats_print().), which was backported as b599b32280e1142856b0b96293a71e1684b1ccfb (with the same bugs except the inapplicable "metatata" misspelling) and first released in 4.3.0.
| * Simplify arena_slab_regind().Jason Evans2016-12-235-59/+66
| | | | | | | | | | | | | | | | | | Rewrite arena_slab_regind() to provide sufficient constant data for the compiler to perform division strength reduction. This replaces more general manual strength reduction that was implemented before arena_bin_info was compile-time-constant. It would be possible to slightly improve on the compiler-generated division code by taking advantage of range limits that the compiler doesn't know about.
| * Restructure *CFLAGS/*CXXFLAGS configuration.Jason Evans2016-12-163-133/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | Convert CFLAGS/CXXFLAGS to be concatenations: CFLAGS := CONFIGURE_CFLAGS SPECIFIED_CFLAGS EXTRA_CFLAGS CXXFLAGS := CONFIGURE_CXXFLAGS SPECIFIED_CXXFLAGS EXTRA_CXXFLAGS This ordering makes it possible to override the flags set by the configure script both during and after configuration, with CFLAGS/CXXFLAGS and EXTRA_CFLAGS/EXTRA_CXXFLAGS, respectively. This resolves #504.
| * Re-expand the Travis-CI build matrix.Jason Evans2016-12-141-0/+7
| |
| * Update Travis-CI config for C++ integration.Jason Evans2016-12-131-11/+8
| |
| * Add some missing explicit casts.Jason Evans2016-12-131-3/+4
| |
| * jemalloc cpp new/delete bindingsDave Watson2016-12-1313-25/+905
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds cpp bindings for jemalloc, along with necessary autoconf settings. This is mostly to add sized deallocation support, which can't be added from C directly. Sized deallocation is ~10% microbench improvement. * Import ax_cxx_compile_stdcxx.m4 from the autoconf repo, seems like the easiest way to get c++14 detection. * Adds various other changes, like CXXFLAGS, to configure.ac. * Adds new rules to Makefile.in for src/jemalloc-cpp.cpp, and a basic unittest. * Both new and delete are overridden, to ensure jemalloc is used for both. * TODO future enhancement of avoiding extra PLT thunks for new and delete - sdallocx and malloc are publicly exported jemalloc symbols, using an alias would link them directly. Unfortunately, was having trouble getting it to play nice with jemalloc's namespace support. Testing: Tested gcc 4.8, gcc 5, gcc 5.2, clang 4.0. Only gcc >= 5 has sized deallocation support, verified that the rest build correctly. Tested mac osx and Centos. Tested --with-jemalloc-prefix and --without-export. This resolves #202.
| * Add a_type parameter to qr_{meld,split}().Jason Evans2016-12-133-11/+11
| |
| * Update ChangeLog for 4.4.0.Jason Evans2016-12-041-0/+27
| |
| * Add --disable-syscall.Jason Evans2016-12-045-15/+33
| | | | | | | | This resolves #517.
| * Update configure cache file example.Jason Evans2016-11-301-12/+6
| |
| * Implement a more reliable detection scheme for os_unfair_lock.John Szakmeister2016-11-231-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | The core issue here is the weak linking of the symbol, and in certain environments--for instance, using the latest Xcode (8.1) with the latest SDK (10.12)--os_unfair_lock may resolve even though you're compiling on a host that doesn't support it (10.11). We can use the availability macros to circumvent this problem, and detect that we're not compiling for a target that is going to support them and error out at compile time. The other alternative is to do a runtime check, but that presents issues for cross-compiling.
| * Enable overriding JEMALLOC_{ALLOC,FREE}_JUNK.Jason Evans2016-11-221-2/+6
| | | | | | | | This resolves #509.
| * Style fixes.Jason Evans2016-11-221-6/+6
| |
| * Add pthread_atfork(3) feature test.Jason Evans2016-11-173-2/+14
| | | | | | | | | | | | Some versions of Android provide a pthreads library without providing pthread_atfork(), so in practice a separate feature test is necessary for the latter.
| * Update a comment.Jason Evans2016-11-171-1/+1
| |
| * Refactor madvise(2) configuration.Jason Evans2016-11-173-30/+39
| | | | | | | | | | | | | | | | | | Add feature tests for the MADV_FREE and MADV_DONTNEED flags to madvise(2), so that MADV_FREE is detected and used for Linux kernel versions 4.5 and newer. Refactor pages_purge() so that on systems which support both flags, MADV_FREE is preferred over MADV_DONTNEED. This resolves #387.
| * Remove a residual comment.Jason Evans2016-11-171-1/+0
| |
| * Avoid gcc type-limits warnings.Jason Evans2016-11-171-12/+30
| |
| * Remove size_t -> unsigned -> size_t conversion.Maks Naumov2016-11-161-2/+1
| |
| * Document how to use --cache configure option.Jason Evans2016-11-161-0/+15
| | | | | | | | This resolves #494.
| * Revert "Add JE_RUNNABLE() and use it for os_unfair_lock_*() test."Jason Evans2016-11-161-16/+1
| | | | | | | | | | | | This reverts commit a2e601a2236315fb6f994ff364ea442ed0aed07b. JE_RUNNABLE() causes general cross-compilation issues.
| * Uniformly cast mallctl[bymib]() oldp/newp arguments to (void *).Jason Evans2016-11-153-10/+11
| | | | | | | | | | This avoids warnings in some cases, and is otherwise generally good hygiene.
| * Add packing test, which verifies stable layout policy.Jason Evans2016-11-152-0/+168
| |
| * Add extent serial numbers.Jason Evans2016-11-157-35/+126
| | | | | | | | | | | | | | | | Add extent serial numbers and use them where appropriate as a sort key that is higher priority than address, so that the allocation policy prefers older extents. This resolves #147.
| * Fix arena_reset() crashing bug.Jason Evans2016-11-151-41/+42
| | | | | | | | | | This regression was caused by 498856f44a30b31fe713a18eb2fc7c6ecf3a9f63 (Move slabs out of chunks.).
| * Add JE_RUNNABLE() and use it for os_unfair_lock_*() test.Jason Evans2016-11-121-1/+16
| | | | | | | | This resolves #494.
| * Reduce memory usage for sdallocx() test_alignment_and_size.Jason Evans2016-11-121-2/+2
| |
| * Add configure support for *-*-linux-android.Jason Evans2016-11-101-0/+12
| | | | | | | | | | | | | | This is tailored to Android, i.e. more specific than the *-*-linux* configuration. This resolves #471.
| * Update config.{guess,sub} from upstream.Jason Evans2016-11-102-90/+160
| |
| * Update ChangeLog for 4.3.1.Jason Evans2016-11-081-0/+8
| |
| * Fix test_prng_lg_range_zu() to work on 32-bit systems.Jason Evans2016-11-071-10/+10
| |
| * Rename atomic_*_{uint32,uint64,u}() to atomic_*_{u32,u64,zu}().Jason Evans2016-11-078-139/+139
| | | | | | | | This change conforms to naming conventions throughout the codebase.
| * Revert "Define 64-bits atomics unconditionally"Jason Evans2016-11-071-8/+10
| | | | | | | | | | | | This reverts commit c2942e2c0e097e7c75a3addd0b9c87758f91692e. This resolves #495.
| * Refactor prng to not use 64-bit atomics on 32-bit platforms.Jason Evans2016-11-078-52/+334
| | | | | | | | This resolves #495.
| * Update ChangeLog for 4.3.0.Jason Evans2016-11-041-0/+2
| |
| * Fixes to Visual Studio Project filesMatthew Parkinson2016-11-042-6/+14
| |
| * Use -std=gnu11 if available.Jason Evans2016-11-041-2/+8
| | | | | | | | This supersedes -std=gnu99, and enables C11 atomics.
| * Update ChangeLog for 4.3.0.Jason Evans2016-11-041-3/+9
| |
| * Fix/simplify extent_recycle() allocation size computations.Jason Evans2016-11-041-6/+5
| | | | | | | | | | | | | | | | | | | | | | Do not call s2u() during alloc_size computation, since any necessary ceiling increase is taken care of later by extent_first_best_fit() --> extent_size_quantize_ceil(), and the s2u() call may erroneously cause a higher quantization result. Remove an overly strict overflow check that was added in 4a7852137d8b6598fdb90ea8e1fd3bc8a8b94a3a (Fix extent_recycle()'s cache-oblivious padding support.).
| * Fix extent_recycle()'s cache-oblivious padding support.Jason Evans2016-11-041-5/+6
| | | | | | | | | | | | | | Add padding *after* computing the size class, so that the optimal size class isn't skipped during search for a usable extent. This regression was caused by b46261d58b449cc4c099ed2384451a2499688f0e (Implement cache-oblivious support for huge size classes.).
| * Fix psz/pind edge cases.Jason Evans2016-11-047-53/+39
| | | | | | | | | | | | | | | | | | Add an "over-size" extent heap in which to store extents which exceed the maximum size class (plus cache-oblivious padding, if enabled). Remove psz2ind_clamp() and use psz2ind() instead so that trying to allocate the maximum size class can in principle succeed. In practice, this allows assertions to hold so that OOM errors can be successfully generated.