summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add Travis-CI configurationMike Hommey2016-07-071-0/+29
|
* Define 64-bits atomics unconditionallyMike Hommey2016-06-091-10/+8
| | | | They are used on all platforms in prng.h.
* Fix extent_*_get to build with MSVCMike Hommey2016-06-091-4/+4
|
* Add an AppVeyor configMike Hommey2016-06-091-0/+28
| | | | | | | | | | | | This builds jemalloc and runs all checks with: - MSVC 2015 64-bits - MSVC 2015 32-bits - MINGW64 (from msys2) - MINGW32 (from msys2) Normally, AppVeyor configs are named appveyor.yml, but it is possible to configure the .yml file name in the AppVeyor project settings such that the file stays "hidden", like typical travis configs.
* Don't use compact red-black trees with the pgi compilerElliot Ronaghan2016-06-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some bug (either in the red-black tree code, or in the pgi compiler) seems to cause red-black trees to become unbalanced. This issue seems to go away if we don't use compact red-black trees. Since red-black trees don't seem to be used much anymore, I opted for what seems to be an easy fix here instead of digging in and trying to find the root cause of the bug. Some context in case it's helpful: I experienced a ton of segfaults while using pgi as Chapel's target compiler with jemalloc 4.0.4. The little bit of debugging I did pointed me somewhere deep in red-black tree manipulation, but I didn't get a chance to investigate further. It looks like 4.2.0 replaced most uses of red-black trees with pairing-heaps, which seems to avoid whatever bug I was hitting. However, `make check_unit` was still failing on the rb test, so I figured the core issue was just being masked. Here's the `make check_unit` failure: ```sh === test/unit/rb === test_rb_empty: pass tree_recurse:test/unit/rb.c:90: Failed assertion: (((_Bool) (((uintptr_t) (left_node)->link.rbn_right_red) & ((size_t)1)))) == (false) --> true != false: Node should be black test_rb_random:test/unit/rb.c:274: Failed assertion: (imbalances) == (0) --> 1 != 0: Tree is unbalanced tree_recurse:test/unit/rb.c:90: Failed assertion: (((_Bool) (((uintptr_t) (left_node)->link.rbn_right_red) & ((size_t)1)))) == (false) --> true != false: Node should be black test_rb_random:test/unit/rb.c:274: Failed assertion: (imbalances) == (0) --> 1 != 0: Tree is unbalanced node_remove:test/unit/rb.c:190: Failed assertion: (imbalances) == (0) --> 2 != 0: Tree is unbalanced <jemalloc>: test/unit/rb.c:43: Failed assertion: "pathp[-1].cmp < 0" test/test.sh: line 22: 12926 Aborted Test harness error ``` While starting to debug I saw the RB_COMPACT option and decided to check if turning that off resolved the bug. It seems to have fixed it (`make check_unit` passes and the segfaults under Chapel are gone) so it seems like on okay work-around. I'd imagine this has performance implications for red-black trees under pgi, but if they're not going to be used much anymore it's probably not a big deal.
* Work around a weird pgi bug in test/unit/math.cElliot Ronaghan2016-06-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | pgi fails to compile math.c, reporting that `-INFINITY` in `pt_norm_expected[]` is a "Non-constant" expression. A simplified version of this failure is: ```c #include <math.h> static double inf1, inf2 = INFINITY; // no complaints static double inf3 = INFINITY; // suddenly INFINITY is "Non-constant" int main() { } ``` ```sh PGC-S-0074-Non-constant expression in initializer (t.c: 4) ``` pgi errors on the declaration of inf3, and will compile fine if that line is removed. I've reported this bug to pgi, but in the meantime I just switched to using (DBL_MAX + DBL_MAX) to work around this bug.
* Update ChangeLog for 4.2.1.Jason Evans2016-06-081-0/+11
|
* Fix potential VM map fragmentation regression.Jason Evans2016-06-072-2/+2
| | | | | | | | Revert 245ae6036c09cc11a72fab4335495d95cddd5beb (Support --with-lg-page values larger than actual page size.), because it could cause VM map fragmentation if the kernel grows mmap()ed memory downward. This resolves #391.
* Fix mixed decl in nstime.cElliot Ronaghan2016-06-071-3/+5
| | | | Fix mixed decl in the gettimeofday() branch of nstime_update()
* Propagate tsdn to default extent hooks.Jason Evans2016-06-071-25/+78
| | | | | | | This avoids bootstrapping issues for configurations that require allocation during tsd initialization. This resolves #390.
* Use extent_commit_wrapper() rather than directly calling commit hook.Jason Evans2016-06-061-3/+2
| | | | | As a side effect this causes the extent's 'committed' flag to be updated.
* Set 'committed' in extent_[de]commit_wrapper().Jason Evans2016-06-061-8/+13
|
* Relax extent hook tests to work with unsplittable extents.Jason Evans2016-06-061-8/+19
|
* Fix regressions related extent splitting failures.Jason Evans2016-06-062-4/+8
| | | | | | | | | | Fix a fundamental extent_split_wrapper() bug in an error path. Fix extent_recycle() to deregister unsplittable extents before leaking them. Relax xallocx() test assertions so that unsplittable extents don't cause test failures.
* Fix an extent [de]allocation/[de]registration race.Jason Evans2016-06-061-4/+17
| | | | | Deregister extents before deallocation, so that subsequent reallocation/registration doesn't race with deregistration.
* Fix extent_alloc_dss() regressions.Jason Evans2016-06-064-22/+33
| | | | | Page-align the gap, if any, and add/use extent_dalloc_gap(), which registers the gap extent before deallocation.
* Fix gdump triggering regression.Jason Evans2016-06-061-13/+11
| | | | | Now that extents are not multiples of chunksize, it's necessary to track pages rather than chunks.
* Work around legitimate xallocx() failures during testing.Jason Evans2016-06-061-6/+12
| | | | | | | | | | With the removal of subchunk size class infrastructure, there are no large size classes that are guaranteed to be re-expandable in place unless munmap() is disabled. Work around these legitimate failures with rallocx() fallback calls. If there were no test configuration for which the xallocx() calls succeeded, it would be important to override the extent hooks for testing purposes, but by default these tests don't use the rallocx() fallbacks on Linux, so test coverage is still sufficient.
* Remove a stray memset(), and fix a junk filling test regression.Jason Evans2016-06-064-7/+34
|
* Silence a bogus compiler warning.Jason Evans2016-06-061-1/+3
|
* Fix locking order reversal in arena_reset().Jason Evans2016-06-061-5/+13
|
* Modify extent hook functions to take an (extent_t *) argument.Jason Evans2016-06-0610-311/+308
| | | | | | | This facilitates the application accessing its own extent allocator metadata during hook invocations. This resolves #259.
* Add rtree lookup path caching.Jason Evans2016-06-067-95/+268
| | | | | | | | | rtree-based extent lookups remain more expensive than chunk-based run lookups, but with this optimization the fast path slowdown is ~3 CPU cycles per metadata lookup (on Intel Core i7-4980HQ), versus ~11 cycles prior. The path caching speedup tends to degrade gracefully unless allocated memory is spread far apart (as is the case when using a mixture of sbrk() and mmap()).
* Make tsd cleanup functions optional, remove noop cleanup functions.Jason Evans2016-06-0611-81/+23
|
* Remove some unnecessary locking.Jason Evans2016-06-061-20/+2
|
* Reduce NSZS, since NSIZES (was nsizes) can not be so large.Jason Evans2016-06-061-1/+1
|
* Fix rallocx() sampling code to not eagerly commit sampler update.Jason Evans2016-06-061-3/+3
| | | | | | rallocx() for an alignment-constrained request may end up with a smaller-than-worst-case size if in-place reallocation succeeds due to serendipitous alignment. In such cases, sampling may not happen.
* Add a missing prof_alloc_rollback() call.Jason Evans2016-06-061-0/+1
| | | | | | In the case where prof_alloc_prep() is called with an over-estimate of allocation size, and sampling doesn't end up being triggered, the tctx must be discarded.
* Miscellaneous s/chunk/extent/ updates.Jason Evans2016-06-068-19/+17
|
* Relax NBINS constraint (max 255 --> max 256).Jason Evans2016-06-061-4/+2
|
* Relax opt_lg_chunk clamping constraints.Jason Evans2016-06-061-10/+2
|
* Remove obsolete stats.arenas.<i>.metadata.mapped mallctl.Jason Evans2016-06-068-73/+34
| | | | | Rename stats.arenas.<i>.metadata.allocated mallctl to stats.arenas.<i>.metadata .
* Better document --enable-ivsalloc.Jason Evans2016-06-063-6/+14
|
* Rename most remaining *chunk* APIs to *extent*.Jason Evans2016-06-0619-1159/+1151
|
* s/chunk_lookup/extent_lookup/g, s/chunks_rtree/extents_rtree/gJason Evans2016-06-068-44/+55
|
* s/CHUNK_HOOKS_INITIALIZER/EXTENT_HOOKS_INITIALIZER/gJason Evans2016-06-065-16/+16
|
* Rename chunks_{cached,retained,mtx} to extents_{cached,retained,mtx}.Jason Evans2016-06-064-34/+35
|
* Rename chunk_*_t hooks to extent_*_t.Jason Evans2016-06-063-126/+129
|
* s/chunk_hook/extent_hook/gJason Evans2016-06-0612-191/+200
|
* Rename huge to large.Jason Evans2016-06-0637-626/+587
|
* Update private symbols.Jason Evans2016-06-062-13/+21
|
* Move slabs out of chunks.Jason Evans2016-06-0621-2327/+591
|
* Improve interval-based profile dump triggering.Jason Evans2016-06-062-1/+15
| | | | | | | | | | | When an allocation is large enough to trigger multiple dumps, use modular math rather than subtraction to reset the interval counter. Prior to this change, it was possible for a single allocation to cause many subsequent allocations to all trigger profile dumps. When updating usable size for a sampled object, try to cancel out the difference between LARGE_MINCLASS and usable size from the interval counter.
* Use huge size class infrastructure for large size classes.Jason Evans2016-06-0634-1975/+459
|
* Implement cache-oblivious support for huge size classes.Jason Evans2016-06-0312-170/+298
|
* Allow chunks to not be naturally aligned.Jason Evans2016-06-0311-268/+105
| | | | | Precisely size extents for huge size classes that aren't multiples of chunksize.
* Remove CHUNK_ADDR2BASE() and CHUNK_ADDR2OFFSET().Jason Evans2016-06-036-183/+190
|
* Make extent_prof_tctx_[gs]et() atomic.Jason Evans2016-06-031-3/+7
|
* Add extent_dirty_[gs]et().Jason Evans2016-06-036-10/+34
|
* Convert rtree from per chunk to per page.Jason Evans2016-06-035-52/+94
| | | | Refactor [de]registration to maintain interior rtree entries for slabs.