summaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Add a simple timer implementation for use in benchmarking.Jason Evans2014-09-083-0/+74
|
* Whitespace cleanups.Jason Evans2014-09-051-10/+10
|
* Add rb_empty().Jason Evans2014-08-201-0/+3
|
* Fix arena.<i>.dss mallctl to handle read-only calls.Jason Evans2014-08-151-0/+13
|
* Add atomic operations tests and fix latent bugs.Jason Evans2014-08-071-0/+97
|
* Fix thd_join on win64Mike Hommey2014-06-021-2/+5
|
* Use KQU() rather than QU() where applicable.Jason Evans2014-05-293-1046/+1046
| | | | Fix KZI() and KQI() to append LL rather than ULL.
* Use nallocx() rather than mallctl() to trigger initialization.Jason Evans2014-05-281-1/+1
| | | | | | Use nallocx() rather than mallctl() to trigger initialization, because nallocx() has no side effects other than initialization, whereas mallctl() does a bunch of internal memory allocation.
* Make sure initialization occurs prior to running tests.Jason Evans2014-05-281-1/+14
|
* Fixup after 3a730df (Avoid pointer arithmetic on void*[...])Mike Hommey2014-05-281-2/+2
|
* Correctly return exit code from thd_join on WindowsMike Hommey2014-05-281-1/+2
|
* Define INFINITY when it's not definedMike Hommey2014-05-281-0/+6
|
* Move platform headers and tricks from jemalloc_internal.h.in to a new ↵Mike Hommey2014-05-281-0/+1
| | | | jemalloc_internal_decls.h header
* Use ULL prefix instead of LLU for unsigned long longsMike Hommey2014-05-272-1001/+1001
| | | | MSVC only supports the former.
* Avoid pointer arithmetic on void* in test/integration/rallocx.cMike Hommey2014-05-271-3/+5
|
* Rename "small" local variable, because windows headers #define itMike Hommey2014-05-271-4/+4
|
* Use C99 varadic macros instead of GCC onesMike Hommey2014-05-272-196/+196
|
* Replace variable arrays in tests with VARIABLE_ARRAYMike Hommey2014-05-272-3/+3
|
* Define _CRT_SPINCOUNT in test/src/mtx.c like in src/mutex.cMike Hommey2014-05-271-0/+4
|
* Refactor huge allocation to be managed by arenas.Jason Evans2014-05-165-72/+24
| | | | | | | | | | | | | | | | | | | | 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.
* Add support for user-specified chunk allocators/deallocators.aravind2014-05-121-0/+61
| | | | | | | Add new mallctl endpoints "arena<i>.chunk.alloc" and "arena<i>.chunk.dealloc" to allow userspace to configure jemalloc's chunk allocator and deallocator on a per-arena basis.
* Fix coding sytle nits.Jason Evans2014-05-012-3/+3
|
* Remove the "opt.valgrind" mallctl.Jason Evans2014-04-151-1/+0
| | | | | Remove the "opt.valgrind" mallctl because it is unnecessary -- jemalloc automatically detects whether it is running inside valgrind.
* Remove the "arenas.purge" mallctl.Jason Evans2014-04-151-13/+0
| | | | | Remove the "arenas.purge" mallctl, which was obsoleted by the "arena.<i>.purge" mallctl in 3.1.0.
* Make dss non-optional, and fix an "arena.<i>.dss" mallctl bug.Jason Evans2014-04-152-7/+30
| | | | | | | 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.
* Remove the *allocm() API, which is superceded by the *allocx() API.Jason Evans2014-04-154-221/+3
|
* Enable big-endian mode for SFMT.Jason Evans2014-03-311-0/+3
| | | | | Add cpp logic to enable big-endian mode in SFMT. This should fix SFMT tests on e.g. MIPS and SPARC.
* Adapt hash tests to big-endian systems.Jason Evans2014-03-301-0/+6
| | | | | | | | | 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.
* Reduce maximum tested alignment.Jason Evans2014-03-303-6/+4
| | | | | | | Reduce maximum tested alignment from 2^29 to 2^25. Some systems may not have enough contiguous virtual memory to satisfy the larger alignment, but the smaller alignment is still adequate to test multi-chunk alignment.
* Fix message formatting errors uncovered by p_test_fail() refactoring.Jason Evans2014-03-305-11/+12
|
* Fix p_test_fail()'s va_list abuse.Jason Evans2014-03-303-22/+43
| | | | | | | | | 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.
* Convert ALLOCM_ARENA() test to MALLOCX_ARENA() test.Jason Evans2014-03-281-4/+4
|
* Remove duplicate 'static' keyword.Jason Evans2014-02-261-1/+1
| | | | Reported by İsmail Dönmez.
* Restore tail call optimization subversion.Jason Evans2014-02-261-7/+13
| | | | | | Restore the essence of 898960247a8b2e6534738b7a3a244855f379faf9, which sabotages tail call optimization. This is necessary even when the mutually recursive functions are in separate compilation units.
* Fix junk filling for mremap(2)-based huge reallocation.Jason Evans2014-02-251-3/+6
| | | | | | | 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.
* Break prof_accum into multiple compilation units.Jason Evans2014-02-254-37/+36
| | | | | | Break prof_accum into multiple compilation units, in order to thwart compiler optimizations such as inlining and tail call optimization that would alter backtraces.
* Prevent inlining of backtraced test functions.Jason Evans2014-01-291-2/+2
| | | | | Inlining of alloc_0() and alloc_1() would prevent generation of unique backtraces, upon which the test code relies.
* Remove flawed alignment-related overflow test.Jason Evans2014-01-291-23/+0
| | | | | | | | Remove the allocm() test equivalent to the mallocx() test removed in the previous commit. The flawed test attempted to cause OOM due to large request size and alignment constraint. Although this test "passed" on 64-bit systems due to the virtual memory hole, it could pass on some 32-bit systems.
* Fix/remove flawed alignment-related overflow tests.Jason Evans2014-01-293-25/+4
| | | | | | | Fix/remove three related flawed tests that attempted to cause OOM due to large request size and alignment constraint. Although these tests "passed" on 64-bit systems due to the virtual memory hole, they could pass on some 32-bit systems.
* Fix mallctl argument size mismatches (size_t vs. uint64_t).Jason Evans2014-01-291-8/+15
| | | | Reported by İsmail Dönmez.
* Test and fix malloc_printf("%%").Jason Evans2014-01-221-0/+2
|
* Subvert tail call optimization in backtrace test.Jason Evans2014-01-211-11/+17
| | | | | | | 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.
* Fix unused variable warnings.Jason Evans2014-01-211-3/+1
|
* Avoid lazy-lock in a tcache-dependent test.Jason Evans2014-01-211-14/+34
|
* Add heap profiling tests.Jason Evans2014-01-173-0/+223
| | | | | | Fix a regression in prof_dump_ctx() due to an uninitized variable. This was caused by revision 4f37ef693e3d5903ce07dc0b61c0da320b35e3d9, so no releases are affected.
* Fix name mangling for stress tests.Jason Evans2014-01-171-4/+6
| | | | | | | | | | | Fix stress tests such that testlib code uses the jet_ allocator, but test code uses libjemalloc. Generate jemalloc_{rename,mangle}.h, the former because it's needed for the stress test name mangling fix, and the latter for consistency. As an artifact of this change, some (but not all) definitions related to the experimental API are absent from the headers unless the feature is enabled at configure time.
* Fix warnings and a test failure exposed on CentOS 6.3.Jason Evans2014-01-152-4/+5
|
* Extract profiling code from [re]allocation functions.Jason Evans2014-01-122-63/+0
| | | | | | | | | | | | | | | | | | | Extract profiling code from malloc(), imemalign(), calloc(), realloc(), mallocx(), rallocx(), and xallocx(). This slightly reduces the amount of code compiled into the fast paths, but the primary benefit is the combinatorial complexity reduction. Simplify iralloc[t]() by creating a separate ixalloc() that handles the no-move cases. Further simplify [mrxn]allocx() (and by implication [mrn]allocm()) to make request size overflows due to size class and/or alignment constraints trigger undefined behavior (detected by debug-only assertions). Report ENOMEM rather than EINVAL if an OOM occurs during heap profiling backtrace creation in imemalign(). This bug impacted posix_memalign() and aligned_alloc().
* Add junk/zero filling unit tests, and fix discovered bugs.Jason Evans2014-01-083-3/+300
| | | | | | Fix growing large reallocation to junk fill new space. Fix huge deallocation to junk fill when munmap is disabled.
* Add util unit tests, and fix discovered bugs.Jason Evans2014-01-072-0/+377
| | | | | | | | | | | | | 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.