da74e77beefbc6ea0f9d7dbf663bc5df48fbd887 |
29-May-2014 |
Jason Evans <je@fb.com> |
Use KQU() rather than QU() where applicable. Fix KZI() and KQI() to append LL rather than ULL.
FMT.c
til.c
|
dacbd75c64e809f2f68cac2fca6b470e80283b4a |
28-May-2014 |
Mike Hommey <mh@glandium.org> |
Define INFINITY when it's not defined
ath.c
|
8f4d78defb449d2c8432ad5edc5f3d1af3239065 |
21-May-2014 |
Mike Hommey <mh@glandium.org> |
Use ULL prefix instead of LLU for unsigned long longs MSVC only supports the former.
FMT.c
|
ef84392d32f38dfce00852217999f5859cadda5a |
21-May-2014 |
Mike Hommey <mh@glandium.org> |
Rename "small" local variable, because windows headers #define it
tats.c
|
b105e65e3ceb60def3908aa2945f94011d61e3fd |
21-May-2014 |
Mike Hommey <mh@glandium.org> |
Use C99 varadic macros instead of GCC ones
til.c
|
24feae6bd0c8c8d2cee97ab6588a92a81266a861 |
21-May-2014 |
Mike Hommey <mh@glandium.org> |
Replace variable arrays in tests with VARIABLE_ARRAY
ash.c
allctl.c
|
12141150fdbda57651a53ae2fe0edaea4891d814 |
16-May-2014 |
Jason Evans <je@fb.com> |
Refactor huge allocation to be managed by arenas. Refactor huge allocation to be managed by arenas (though the global red-black tree of huge allocations remains for lookup during deallocation). This is the logical conclusion of recent changes that 1) made per arena dss precedence apply to huge allocation, and 2) made it possible to replace the per arena chunk allocation/deallocation functions. Remove the top level huge stats, and replace them with per arena huge stats. Normalize function names and types to *dalloc* (some were *dealloc*). Remove the --enable-mremap option. As jemalloc currently operates, this is a performace regression for some applications, but planned work to logarithmically space huge size classes should provide similar amortized performance. The motivation for this change was that mremap-based huge reallocation forced leaky abstractions that prevented refactoring.
unk.c
allctl.c
tats.c
|
ecd3e59ca351d7111ec72a327fe0c009f2aa69a0 |
15-Apr-2014 |
Jason Evans <je@fb.com> |
Remove the "opt.valgrind" mallctl. Remove the "opt.valgrind" mallctl because it is unnecessary -- jemalloc automatically detects whether it is running inside valgrind.
allctl.c
|
a2c719b37445ce9083b6fc5084436dc37ceb7f75 |
15-Apr-2014 |
Jason Evans <je@fb.com> |
Remove the "arenas.purge" mallctl. Remove the "arenas.purge" mallctl, which was obsoleted by the "arena.<i>.purge" mallctl in 3.1.0.
allctl.c
|
4d434adb146375ad17f0d5e994ed5728d2942e3f |
15-Apr-2014 |
Jason Evans <je@fb.com> |
Make dss non-optional, and fix an "arena.<i>.dss" mallctl bug. Make dss non-optional on all platforms which support sbrk(2). Fix the "arena.<i>.dss" mallctl to return an error if "primary" or "secondary" precedence is specified, but sbrk(2) is not supported.
allctl.c
|
9790b9667fd975b1f9a4f108f9d0a20ab265c6b6 |
15-Apr-2014 |
Jason Evans <jasone@canonware.com> |
Remove the *allocm() API, which is superceded by the *allocx() API.
q.c
|
df3f27024f193b7baeedcd9f3799b4774dd20bbf |
31-Mar-2014 |
Jason Evans <jasone@canonware.com> |
Adapt hash tests to big-endian systems. The hash code, which has MurmurHash3 at its core, generates different output depending on system endianness, so adapt the expected output on big-endian systems. MurmurHash3 code also makes the assumption that unaligned access is okay (not true on all systems), but jemalloc only hashes data structures that have sufficient alignment to dodge this limitation.
ash.c
|
ab8c79fdafd6d1ee722c1277ef32c14c6e0c9dd3 |
30-Mar-2014 |
Jason Evans <jasone@canonware.com> |
Fix message formatting errors uncovered by p_test_fail() refactoring.
kh.c
unk.c
uarantine.c
tree.c
ero.c
|
e3f27cfced57ac9c3b5306947d37411479a68c2e |
30-Mar-2014 |
Jason Evans <jasone@canonware.com> |
Fix p_test_fail()'s va_list abuse. p_test_fail() was passing a va_list to two separate functions with the expectation that no reset would occur. Refactor p_test_fail()'s callers to instead format two strings and pass them to p_test_fail(). Add a missing parameter to an assert_u64_eq() call, which the compiler warned about after the assertion macro refactoring.
FMT.c
|
b037a55f365471002bac024ffa1a8392ddcd578f |
26-Feb-2014 |
Jason Evans <je@fb.com> |
Restore tail call optimization subversion. Restore the essence of 898960247a8b2e6534738b7a3a244855f379faf9, which sabotages tail call optimization. This is necessary even when the mutually recursive functions are in separate compilation units.
rof_accum.h
|
940fdfd5eef45f5425f9124e250fddde5c5c48bf |
25-Feb-2014 |
Jason Evans <jasone@canonware.com> |
Fix junk filling for mremap(2)-based huge reallocation. If mremap(2) is used for huge reallocation, physical pages are mapped to new virtual addresses rather than data being copied to new pages. This bypasses the normal junk filling that would happen during allocation, so add junk filling that is specific to this case.
unk.c
|
ad47e8996e649ff8b4c920abb937bbacb8b9625e |
25-Feb-2014 |
Jason Evans <jasone@canonware.com> |
Break prof_accum into multiple compilation units. Break prof_accum into multiple compilation units, in order to thwart compiler optimizations such as inlining and tail call optimization that would alter backtraces.
rof_accum.c
rof_accum.h
rof_accum_a.c
rof_accum_b.c
|
526e4a59a2fe39e4f8bdf1ec0c0d2a5a557c3f62 |
29-Jan-2014 |
Jason Evans <je@fb.com> |
Prevent inlining of backtraced test functions. Inlining of alloc_0() and alloc_1() would prevent generation of unique backtraces, upon which the test code relies.
rof_accum.c
|
2b51a3e9e9bfebf081d25dfa92f3cd89e4a8ed73 |
29-Jan-2014 |
Jason Evans <je@fb.com> |
Fix mallctl argument size mismatches (size_t vs. uint64_t). Reported by İsmail Dönmez.
tats.c
|
0c4e743eaf2ab6bcfd56e002fb82f95801b9292e |
22-Jan-2014 |
Jason Evans <je@fb.com> |
Test and fix malloc_printf("%%").
til.c
|
898960247a8b2e6534738b7a3a244855f379faf9 |
21-Jan-2014 |
Jason Evans <jasone@canonware.com> |
Subvert tail call optimization in backtrace test. Re-structure alloc_[01](), which are mutually tail-recursive functions, to do (unnecessary) work post-recursion so that the compiler cannot perform tail call optimization, thus preserving intentionally unique call paths in captured backtraces.
rof_accum.c
|
e2206edebcce662e3979c68ba182d0bcf38141ba |
21-Jan-2014 |
Jason Evans <jasone@canonware.com> |
Fix unused variable warnings.
b.c
|
7d8fea987182fe2ee17eb5c1c6f3ae620f82beb0 |
21-Jan-2014 |
Jason Evans <jasone@canonware.com> |
Avoid lazy-lock in a tcache-dependent test.
tats.c
|
772163b4f3d8e9a12343e9215f6b070068507604 |
18-Jan-2014 |
Jason Evans <je@fb.com> |
Add heap profiling tests. Fix a regression in prof_dump_ctx() due to an uninitized variable. This was caused by revision 4f37ef693e3d5903ce07dc0b61c0da320b35e3d9, so no releases are affected.
rof_accum.c
rof_gdump.c
rof_idump.c
|
35f1bc4e4bd14e07257f6eddbbbcf0c01b52ba5c |
15-Jan-2014 |
Jason Evans <je@fb.com> |
Fix warnings and a test failure exposed on CentOS 6.3.
tats.c
til.c
|
6b694c4d47278cddfaaedeb7ee49fa5757e35ed5 |
08-Jan-2014 |
Jason Evans <je@fb.com> |
Add junk/zero filling unit tests, and fix discovered bugs. Fix growing large reallocation to junk fill new space. Fix huge deallocation to junk fill when munmap is disabled.
unk.c
uarantine.c
ero.c
|
e18c25d23de0e845f0ee7e11d02c1be044738a3c |
07-Jan-2014 |
Jason Evans <je@fb.com> |
Add util unit tests, and fix discovered bugs. Add unit tests for pow2_ceil(), malloc_strtoumax(), and malloc_snprintf(). Fix numerous bugs in malloc_strotumax() error handling/reporting. These bugs could have caused application-visible issues for some seldom used (0X... and 0... prefixes) or malformed MALLOC_CONF or mallctl() argument strings, but otherwise they had no impact. Fix numerous bugs in malloc_snprintf(). These bugs were not exercised by existing malloc_*printf() calls, so they had no impact.
til.c
|
8cd0d949779930b63d763c3642de157c9f77e1fd |
04-Jan-2014 |
Jason Evans <je@fb.com> |
Convert assert() in test code to assert_*().
b.c
|
981bb499d92fee940d5be79cec3abdd3de3891b8 |
04-Jan-2014 |
Jason Evans <je@fb.com> |
Add unit tests for qr, ql, and rb.
l.c
r.c
b.c
|
b954bc5d3a65966df0ce7801cd6102542b5e894b |
03-Jan-2014 |
Jason Evans <je@fb.com> |
Convert rtree from (void *) to (uint8_t) storage. Reduce rtree memory usage by storing booleans (1 byte each) rather than pointers. The rtree code is only used to record whether jemalloc manages a chunk of memory, so there's no need to store pointers in the rtree. Increase rtree node size to 64 KiB in order to reduce tree depth from 13 to 3 on 64-bit systems. The conversion to more compact leaf nodes was enough by itself to make the rtree depth 1 on 32-bit systems; due to the fact that root nodes are smaller than the specified node size if possible, the node size change has no impact on 32-bit systems (assuming default chunk size).
tree.c
|
b980cc774a9ccb208a82f4e9ccdcc695d06a960a |
03-Jan-2014 |
Jason Evans <je@fb.com> |
Add rtree unit tests.
tree.c
|
5aeeda6f927005294c2e23605b57c5d601a80a8c |
02-Jan-2014 |
Jason Evans <je@fb.com> |
Clean up code formatting.
ash.c
|
0a8696658f8135ae39eeb86e57f7cecc01144894 |
21-Dec-2013 |
Jason Evans <je@fb.com> |
Add stats unit tests.
tats.c
|
de73296d6b56abe70b08654342e136c2612d1dbd |
19-Dec-2013 |
Jason Evans <je@fb.com> |
Add mallctl*() unit tests.
allctl.c
|
0d6c5d8bd0d866a0ce4ce321259cec65d6459821 |
18-Dec-2013 |
Jason Evans <jasone@canonware.com> |
Add quarantine unit tests. Verify that freed regions are quarantined, and that redzone corruption is detected. Introduce a testing idiom for intercepting/replacing internal functions. In this case the replaced function is ordinarily a static function, but the idiom should work similarly for library-private functions.
uarantine.c
|
eca367b77909ebd649fbd0430e1e9b80dded14e0 |
17-Dec-2013 |
Jason Evans <jasone@canonware.com> |
Fix a typo in a string constant.
ash.c
|
e6b7aa4a609d4b514d772ee4a1340778a195f6f7 |
17-Dec-2013 |
Jason Evans <jasone@canonware.com> |
Add hash (MurmurHash3) tests. Add hash tests that are based on SMHasher's VerificationTest() function.
ash.c
|
e948fa6439a19f0f3eb44012fd0b3274ebf82b8f |
17-Dec-2013 |
Jason Evans <je@fb.com> |
Add ckh unit tests.
kh.c
|
34779914400988922d36815b7085893fbcc89a2e |
14-Dec-2013 |
Jason Evans <je@fb.com> |
Fix name mangling issues. Move je_* definitions from jemalloc_macros.h.in to jemalloc_defs.h.in, because only the latter is an autoconf header (#undef substitution occurs). Fix unit tests to use automatic mangling, so that e.g. mallocx is macro-substituted to becom jet_mallocx.
q.c
|
d82a5e6a34f20698ab9368bb2b4953b81d175552 |
13-Dec-2013 |
Jason Evans <jasone@canonware.com> |
Implement the *allocx() API. Implement the *allocx() API, which is a successor to the *allocm() API. The *allocx() functions are slightly simpler to use because they have fewer parameters, they directly return the results of primary interest, and mallocx()/rallocx() avoid the strict aliasing pitfall that allocm()/rallocx() share with posix_memalign(). The following code violates strict aliasing rules: foo_t *foo; allocm((void **)&foo, NULL, 42, 0); whereas the following is safe: foo_t *foo; void *p; allocm(&p, NULL, 42, 0); foo = (foo_t *)p; mallocx() does not have this problem: foo_t *foo = (foo_t *)mallocx(42, 0);
q.c
|
0ac396a06a10f8a8c1d41c8771367625e7d49d07 |
13-Dec-2013 |
Jason Evans <jasone@canonware.com> |
Fix a strict aliasing violation.
q.c
|
0f4f1efd94d33a4bbf766d3d4e7e349fa7c0d3b9 |
12-Dec-2013 |
Jason Evans <je@fb.com> |
Add mq (message queue) to test infrastructure. Add mtx (mutex) to test infrastructure, in order to avoid bootstrapping complications that would result from directly using malloc_mutex. Rename test infrastructure's thread abstraction from je_thread to thd. Fix some header ordering issues.
q.c
tx.c
sd.c
|
19609724f9dce1ac644b6cbf89acb740319eb498 |
11-Dec-2013 |
Jason Evans <je@fb.com> |
Clean up SFMT test. Refactor array declarations to remove some dubious casts. Reduce array size to what is actually used. Extract magic numbers into cpp macro definitions.
FMT.c
|
b1941c615023cab9baf0a78a28df1e3b4972434f |
10-Dec-2013 |
Jason Evans <jasone@canonware.com> |
Add probabability distribution utility code. Add probabability distribution utility code that enables generation of random deviates drawn from normal, Chi-square, and Gamma distributions. Fix format strings in several of the assert_* macros (remove a %s). Clean up header issues; it's critical that system headers are not included after internal definitions potentially do things like: #define inline Fix the build system to incorporate header dependencies for the test library C files.
ath.c
|
80061b6df0a8bef0cedbd947d74932ff1c2511e8 |
09-Dec-2013 |
Jason Evans <jasone@canonware.com> |
Integrate SFMT 1.3.3 into test infrastructure. Integrate the SIMD-oriented Fast Mersenne Twister (SFMT) 1.3.3 into the test infrastructure. The sfmt_t state encapsulation modification comes from Crux (http://www.canonware.com/Crux/) and enables multiple concurrent PRNGs. test/unit/SFMT.c is an adaptation of SFMT's test.c that performs all the same validation, both for 32- and 64-bit generation.
FMT.c
|
a4f124f59fa5f702231432a7e5fa45140ba81e2a |
09-Dec-2013 |
Jason Evans <jasone@canonware.com> |
Normalize #define whitespace. Consistently use a tab rather than a space following #define.
sd.c
|
2a83ed0284e92c7ba4bd4efe9df149ac724b2f26 |
09-Dec-2013 |
Jason Evans <jasone@canonware.com> |
Refactor tests. Refactor tests to use explicit testing assertions, rather than diff'ing test output. This makes the test code a bit shorter, more explicitly encodes testing intent, and makes test failure diagnosis more straightforward.
itmap.c
itmap.exp
sd.c
sd.exp
|
72284f03357d6fb4a7ff82542dd1a41d567b0bb2 |
05-Dec-2013 |
Jason Evans <je@fb.com> |
Add tsd test. Submitted by Mike Hommey.
sd.c
sd.exp
|
86abd0dcd8e478759fe409d338d11558c4cec427 |
01-Dec-2013 |
Jason Evans <jasone@canonware.com> |
Refactor to support more varied testing. 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.
itmap.c
itmap.exp
|