- Jan 22, 2014
-
-
Jason Evans authored
-
Jason Evans authored
-
- Jan 18, 2014
-
-
Jason Evans authored
-
- Dec 06, 2013
-
-
Jason Evans authored
Unless heap profiling is enabled, disable floating point code and don't link with libm. This, in combination with e.g. EXTRA_CFLAGS=-mno-sse on x64 systems, makes it possible to completely disable floating point register use. Some versions of glibc neglect to save/restore caller-saved floating point registers during dynamic lazy symbol loading, and the symbol loading code uses whatever malloc the application happens to have linked/loaded with, the result being potential floating point register corruption.
-
- Dec 04, 2013
-
-
Jason Evans authored
Refactor the test harness to support three types of tests: - unit: White box unit tests. These tests have full access to all internal jemalloc library symbols. Though in actuality all symbols are prefixed by jet_, macro-based name mangling abstracts this away from test code. - integration: Black box integration tests. These tests link with the installable shared jemalloc library, and with the exception of some utility code and configure-generated macro definitions, they have no access to jemalloc internals. - stress: Black box stress tests. These tests link with the installable shared jemalloc library, as well as with an internal allocator with symbols prefixed by jet_ (same as for unit tests) that can be used to allocate data structures that are internal to the test code. Move existing tests into test/{unit,integration}/ as appropriate. Split out internal parts of jemalloc_defs.h.in and put them in jemalloc_internal_defs.h.in. This reduces internals exposure to applications that #include <jemalloc/jemalloc.h>. Refactor jemalloc.h header generation so that a single header file results, and the prototypes can be used to generate jet_ prototypes for tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in, jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and use a shell script to generate a unified jemalloc.h at configure time. Change the default private namespace prefix from "" to "je_". Add missing private namespace mangling. Remove hard-coded private_namespace.h. Instead generate it and private_unnamespace.h from private_symbols.txt. Use similar logic for public symbols, which aids in name mangling for jet_ symbols. Add test_warn() and test_fail(). Replace existing exit(1) calls with test_fail() calls.
-
- Oct 21, 2013
-
-
Jason Evans authored
-
- Oct 20, 2013
-
-
Jason Evans authored
Fix a race condition in the "arenas.extend" mallctl that could lead to internal data structure corruption. The race could be hit if one thread called the "arenas.extend" mallctl while another thread concurrently triggered initialization of one of the lazily created arenas.
-
Jason Evans authored
Fix a Valgrind integration flaw that caused Valgrind warnings about reads of uninitialized memory in internal zero-initialized data structures (relevant to tcache and prof code).
-
Jason Evans authored
-
- Oct 03, 2013
-
-
Jason Evans authored
-
- Jun 03, 2013
-
-
Jason Evans authored
-
- Mar 06, 2013
-
-
Jason Evans authored
-
- Feb 06, 2013
-
-
Jason Evans authored
Fix a locking order bug that could cause deadlock during fork if heap profiling were enabled.
-
- Feb 01, 2013
-
-
Jason Evans authored
Fix Valgrind integration to annotate all internally allocated memory in a way that keeps Valgrind happy about internal data structure access.
-
Jason Evans authored
Fix a chunk recycling bug that could cause the allocator to lose track of whether a chunk was zeroed. On FreeBSD, NetBSD, and OS X, it could cause corruption if allocating via sbrk(2) (unlikely unless running with the "dss:primary" option specified). This was completely harmless on Linux unless using mlockall(2) (and unlikely even then, unless the --disable-munmap configure option or the "dss:primary" option was specified). This regression was introduced in 3.1.0 by the mlockall(2)/madvise(2) interaction fix.
-
- Jan 31, 2013
-
-
Jason Evans authored
Internal reallocation of the quarantined object array leaked the old array. Reallocation failure for internal reallocation of the quarantined object array (very unlikely) resulted in memory corruption.
-
Jason Evans authored
Avoid writing to uninitialized TLS as a side effect of deallocation. Initializing TLS during deallocation is unsafe because it is possible that a thread never did any allocation, and that TLS has already been deallocated by the threads library, resulting in write-after-free corruption. These fixes affect prof_tdata and quarantine; all other uses of TLS are already safe, whether intentionally (as for tcache) or unintentionally (as for arenas).
-
- Jan 23, 2013
-
-
Jason Evans authored
-
- Dec 12, 2012
-
-
Jason Evans authored
Fix chunk_recycyle() to unconditionally inform Valgrind that returned memory is undefined. This fixes Valgrind warnings that would result from a huge allocation being freed, then recycled for use as an arena chunk. The arena code would write metadata to the chunk header, and Valgrind would consider these invalid writes.
-
- Nov 30, 2012
-
-
Jason Evans authored
Reported by Mike Hommey.
-
- Nov 09, 2012
-
-
Jason Evans authored
-
- Nov 06, 2012
-
-
Jason Evans authored
Purge unused dirty pages in an order that first performs clean/dirty run defragmentation, in order to mitigate available run fragmentation. Remove the limitation that prevented purging unless at least one chunk worth of dirty pages had accumulated in an arena. This limitation was intended to avoid excessive purging for small applications, but the threshold was arbitrary, and the effect of questionable utility. Relax opt_lg_dirty_mult from 5 to 3. This compensates for increased likelihood of allocating clean runs, given the same ratio of clean:dirty runs, and reduces the potential for repeated purging in pathological large malloc/free loops that push the active:dirty page ratio just over the purge threshold.
-
- Oct 17, 2012
-
-
Jason Evans authored
Fix dss/mmap allocation precedence code to use recyclable mmap memory only after primary dss allocation fails.
-
- Oct 16, 2012
-
-
Jason Evans authored
-
- May 24, 2012
-
-
Jason Evans authored
Remove const from __*_hook variable declarations, so that glibc can modify them during process forking.
-
- May 16, 2012
-
-
Jason Evans authored
Disable tcache by default if running inside Valgrind, in order to avoid making unallocated objects appear reachable to Valgrind.
-
- May 15, 2012
-
-
Jason Evans authored
Auto-detect whether running inside Valgrind, thus removing the need to manually specify MALLOC_CONF=valgrind:true.
-
Jason Evans authored
Fix prof_realloc() to not call prof_ctx_set() if a sampled object is being freed via realloc(p, 0).
-
- May 12, 2012
-
-
Jason Evans authored
-
- May 11, 2012
-
-
Jason Evans authored
Refactor code such that arena_mapbits_{large,small}_set() always preserves the unzeroed flag, and manually manipulate the unzeroed flag in the one case where it actually gets reset (in arena_chunk_purge()). This fixes unzeroed preservation bugs in arena_run_split() and arena_ralloc_large_grow(). These bugs caused large calloc() to return non-zeroed memory under some circumstances.
-
- Apr 25, 2012
-
-
Jason Evans authored
Fix the "epoch" mallctl to update cached stats even if the passed in epoch is 0.
-
- Apr 23, 2012
-
-
Jason Evans authored
-
Jason Evans authored
-
Jason Evans authored
Fix a potential deadlock that could occur during interval- and growth-triggered heap profile dumps. Fix an off-by-one heap profile statistics bug that could be observed in interval- and growth-triggered heap profiles. Fix heap profile dump filename sequence numbers (regression during conversion to malloc_snprintf()).
-
- Apr 21, 2012
-
-
Jason Evans authored
Fix a memory corruption bug in chunk_alloc_dss() that was due to claiming newly allocated memory is zeroed. Reverse order of preference between mmap() and sbrk() to prefer mmap(). Clean up management of 'zero' parameter in chunk_alloc*().
-
- Apr 20, 2012
-
-
Jason Evans authored
-
- Apr 18, 2012
-
-
Jason Evans authored
Change the "opt.lg_prof_sample" default from 0 to 19 (1 B to 512 KiB). Change the "opt.prof_accum" default from true to false. Add the "opt.prof_final" mallctl, so that "opt.prof_prefix" need not be abused to disable final profile dumping.
-
Jason Evans authored
-
- Apr 17, 2012
-
-
Jason Evans authored
Start preparing ChangeLog for 3.0.0 release. Additional fixes and changes are yet to come, so this is not a complete ChangeLog.
-
- Nov 15, 2011
-
-
Jason Evans authored
-