summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Make mallocx() OOM test more robust.Jason Evans2015-09-241-3/+14
| | | | | | Make mallocx() OOM testing work correctly even on systems that can allocate the majority of virtual address space in a single contiguous region.
* Fix xallocx(..., MALLOCX_ZERO) bugs.Jason Evans2015-09-244-15/+148
| | | | | | | | | | Zero all trailing bytes of large allocations when --enable-cache-oblivious configure option is enabled. This regression was introduced by 8a03cf039cd06f9fa6972711195055d865673966 (Implement cache index randomization for large allocations.). Zero trailing bytes of huge allocations when resizing from/to a size class that is not a multiple of the chunk size.
* Fix prof_tctx_dump_iter() to filter.Jason Evans2015-09-222-5/+23
| | | | | | | Fix prof_tctx_dump_iter() to filter out nodes that were created after heap profile dumping started. Prior to this fix, spurious entries with arbitrary object/byte counts could appear in heap profiles, which resulted in jeprof inaccuracies or failures.
* Merge branch 'dev'4.0.2Jason Evans2015-09-217-54/+114
|\
| * Update ChangeLog for 4.0.2.Jason Evans2015-09-211-1/+3
| |
| * Fix tsd_boot1() to use explicit 'void' parameter list.Craig Rodrigues2015-09-211-4/+4
| |
| * Make arena_dalloc_large_locked_impl() static.Jason Evans2015-09-201-1/+1
| |
| * Add mallocx() OOM tests.Jason Evans2015-09-172-0/+72
| |
| * Expand check_integration_prof testing.Jason Evans2015-09-171-0/+1
| | | | | | | | | | Run integration tests with MALLOC_CONF="prof:true,prof_active:false" in addition to MALLOC_CONF="prof:true".
| * Fix prof_alloc_rollback().Jason Evans2015-09-172-1/+3
| | | | | | | | | | Fix prof_alloc_rollback() to read tdata from thread-specific data rather than dereferencing a potentially invalid tctx.
| * Simplify imallocx_prof_sample().Jason Evans2015-09-171-26/+13
| | | | | | | | | | | | | | Simplify imallocx_prof_sample() to always operate on usize rather than sometimes using size. This avoids redundant usize computations and more closely fits the style adopted by i[rx]allocx_prof_sample() to fix sampling bugs.
| * Fix irallocx_prof_sample().Jason Evans2015-09-172-5/+7
| | | | | | | | | | Fix irallocx_prof_sample() to always allocate large regions, even when alignment is non-zero.
| * Fix ixallocx_prof_sample().Jason Evans2015-09-172-17/+11
|/ | | | | | Fix ixallocx_prof_sample() to never modify nor create sampled small allocations. xallocx() is in general incapable of moving small allocations, so this fix removes buggy code without loss of generality.
* Merge branch 'dev'4.0.1Jason Evans2015-09-1527-428/+1008
|\
| * Update ChangeLog for 4.0.1.Jason Evans2015-09-151-24/+47
| |
| * Loosen expected xallocx() results.Jason Evans2015-09-151-9/+9
| | | | | | | | | | Systems that do not support chunk split/merge cannot shrink/grow huge allocations in place.
| * Link test to librt if it contains clock_gettime(2).Jason Evans2015-09-152-3/+13
| | | | | | | | This resolves #257.
| * Centralize xallocx() size[+extra] overflow checks.Jason Evans2015-09-152-14/+11
| |
| * Add more xallocx() overflow tests.Jason Evans2015-09-151-0/+64
| |
| * Reduce variable scope.Dmitry-Me2015-09-153-9/+9
| | | | | | | | This resolves #274.
| * Address portability issues on Solaris.Jason Evans2015-09-152-2/+3
| | | | | | | | | | | | | | | | Don't assume Bourne shell is in /bin/sh when running size_classes.sh . Consider __sparcv9 a synonym for __sparc64__ when defining LG_QUANTUM. This resolves #275.
| * Fix ixallocx_prof() to check for size greater than HUGE_MAXCLASS.Jason Evans2015-09-152-3/+6
| |
| * Don't run stress tests as part of check target.Jason Evans2015-09-151-1/+1
| | | | | | | | | | | | This change was intended as part of 8f57e3f1aeb86021b3d078b825bc8c42b2a9af6f (Remove check_stress from check target's dependencies.).
| * Resolve an unsupported special case in arena_prof_tctx_set().Jason Evans2015-09-156-6/+62
| | | | | | | | | | | | | | | | | | | | | | Add arena_prof_tctx_reset() and use it instead of arena_prof_tctx_set() when resetting the tctx pointer during reallocation, which happens whenever an originally sampled reallocated object is not sampled during reallocation. This regression was introduced by 594c759f37c301d0245dc2accf4d4aaf9d202819 (Optimize arena_prof_tctx_set().)
| * Fix prof_{malloc,free}_sample_object() call order in prof_realloc().Jason Evans2015-09-152-3/+11
| | | | | | | | | | | | Fix prof_realloc() to call prof_free_sampled_object() after calling prof_malloc_sample_object(). Prior to this fix, if tctx and old_tctx were the same, the tctx could have been prematurely destroyed.
| * Fix ixallocx_prof_sample() argument order reversal.Jason Evans2015-09-152-1/+3
| | | | | | | | | | Fix ixallocx_prof() to pass usize_max and zero to ixallocx_prof_sample() in the correct order.
| * s/max_usize/usize_max/gJason Evans2015-09-151-6/+6
| |
| * s/oldptr/old_ptr/gJason Evans2015-09-151-15/+15
| |
| * Make one call to prof_active_get_unlocked() per allocation event.Jason Evans2015-09-153-18/+33
| | | | | | | | | | | | | | Make one call to prof_active_get_unlocked() per allocation event, and use the result throughout the relevant functions that handle an allocation event. Also add a missing check in prof_realloc(). These fixes protect allocation events against concurrent prof_active changes.
| * Fix irealloc_prof() to prof_alloc_rollback() on OOM.Jason Evans2015-09-152-1/+4
| |
| * Optimize irallocx_prof() to optimistically update the sampler state.Jason Evans2015-09-151-3/+3
| |
| * Fix ixallocx_prof() size+extra overflow.Jason Evans2015-09-151-0/+3
| | | | | | | | | | Fix ixallocx_prof() to clamp the extra parameter if size+extra would overflow HUGE_MAXCLASS.
| * Remove check_stress from check target's dependencies.Jason Evans2015-09-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Prior to this change the debug build/test command needed to look like: make all tests && make check_unit && make check_integration && \ make check_integration_prof This is now simply: make check Rename the check_stress target to stress.
| * Rename arena_maxclass to large_maxclass.Jason Evans2015-09-128-28/+28
| | | | | | | | | | arena_maxclass is no longer an appropriate name, because arenas also manage huge allocations.
| * Fix xallocx() bugs.Jason Evans2015-09-129-179/+394
| | | | | | | | | | Fix xallocx() bugs related to the 'extra' parameter when specified as non-zero.
| * Fix "prof.reset" mallctl-related corruption.Jason Evans2015-09-104-20/+84
| | | | | | | | | | | | | | Fix heap profiling to distinguish among otherwise identical sample sites with interposed resets (triggered via the "prof.reset" mallctl). This bug could cause data structure corruption that would most likely result in a segfault.
| * Reduce variables scopeDmitry-Me2015-09-041-9/+10
| |
| * Force initialization of the init_lock in malloc_init_hard on Windows XPMike Hommey2015-09-041-1/+15
| | | | | | | | This resolves #269.
| * Fix pointer comparision with undefined behavior.Jason Evans2015-09-041-2/+2
| | | | | | | | | | | | | | This didn't cause bad code generation in the one case spot-checked (gcc 4.8.1), but had the potential to to so. This bug was introduced by 594c759f37c301d0245dc2accf4d4aaf9d202819 (Optimize arena_prof_tctx_set().).
| * Optimize arena_prof_tctx_set().Jason Evans2015-09-024-28/+56
| | | | | | | | | | Optimize arena_prof_tctx_set() to avoid reading run metadata when deciding whether it's actually necessary to write.
| * Fix TLS configuration.Jason Evans2015-09-022-8/+16
| | | | | | | | | | | | | | | | Fix TLS configuration such that it is enabled by default for platforms on which it works correctly. This regression was introduced by ac5db02034c01357a4ce90504886046a58117921 (Make --enable-tls and --enable-lazy-lock take precedence over configure.ac-hardcoded defaults).
| * Don't purge junk filled chunks when shrinking huge allocationsMike Hommey2015-08-282-6/+12
| | | | | | | | | | | | | | | | When junk filling is enabled, shrinking an allocation fills the bytes that were previously allocated but now aren't. Purging the chunk before doing that is just a waste of time. This resolves #260.
| * Fix chunk purge hook calls for in-place huge shrinking reallocation.Mike Hommey2015-08-282-2/+6
| | | | | | | | | | | | | | | | | | | | Fix chunk purge hook calls for in-place huge shrinking reallocation to specify the old chunk size rather than the new chunk size. This bug caused no correctness issues for the default chunk purge function, but was visible to custom functions set via the "arena.<i>.chunk_hooks" mallctl. This resolves #264.
| * Fix arenas_cache_cleanup() and arena_get_hard().Jason Evans2015-08-282-9/+8
| | | | | | | | | | | | | | | | | | Fix arenas_cache_cleanup() and arena_get_hard() to handle allocation/deallocation within the application's thread-specific data cleanup functions even after arenas_cache is torn down. This is a more general fix that complements 45e9f66c280e1ba8bebf7bed387a43bc9e45536d (Fix arenas_cache_cleanup().).
| * Add JEMALLOC_CXX_THROW to the memalign() function prototype.Jason Evans2015-08-262-1/+4
| | | | | | | | | | | | | | | | | | | | Add JEMALLOC_CXX_THROW to the memalign() function prototype, in order to match glibc and avoid compilation errors when including both jemalloc/jemalloc.h and malloc.h in C++ code. This change was unintentionally omitted from ae93d6bf364e9db9f9ee69c3e5f9df110d8685a4 (Avoid function prototype incompatibilities.).
| * Fix arenas_cache_cleanup().Christopher Ferris2015-08-213-2/+15
| | | | | | | | | | | | Fix arenas_cache_cleanup() to handle allocation/deallocation within the application's thread-specific data cleanup functions even after arenas_cache is torn down.
| * Silence compiler warnings for unreachable code.Jason Evans2015-08-201-12/+14
| | | | | | | | Reported by Ingvar Hagelund.
| * Rename index_t to szind_t to avoid an existing type on Solaris.Jason Evans2015-08-197-70/+71
| | | | | | | | This resolves #256.
| * Don't bitshift by negative amounts.Jason Evans2015-08-194-13/+50
|/ | | | | | | | Don't bitshift by negative amounts when encoding/decoding run sizes in chunk header maps. This affected systems with page sizes greater than 8 KiB. Reported by Ingvar Hagelund <ingvar@redpill-linpro.com>.
* Merge branch 'dev'4.0.0Jason Evans2015-08-17131-9046/+16699
|\