summaryrefslogtreecommitdiffstats
path: root/Makefile.in
Commit message (Collapse)AuthorAgeFilesLines
* Convert ALLOCM_ARENA() test to MALLOCX_ARENA() test.Jason Evans2014-03-281-1/+1
|
* Break prof_accum into multiple compilation units.Jason Evans2014-02-251-3/+12
| | | | | | Break prof_accum into multiple compilation units, in order to thwart compiler optimizations such as inlining and tail call optimization that would alter backtraces.
* Add heap profiling tests.Jason Evans2014-01-171-9/+21
| | | | | | 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-1/+1
| | | | | | | | | | | 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.
* Add junk/zero filling unit tests, and fix discovered bugs.Jason Evans2014-01-081-7/+8
| | | | | | 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-071-1/+1
| | | | | | | | | | | | | 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.
* Add unit tests for qr, ql, and rb.Jason Evans2014-01-041-3/+5
|
* Add rtree unit tests.Jason Evans2014-01-031-2/+2
|
* Add stats unit tests.Jason Evans2013-12-201-1/+2
|
* Add mallctl*() unit tests.Jason Evans2013-12-201-4/+4
|
* Add quarantine unit tests.Jason Evans2013-12-171-1/+2
| | | | | | | | | 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.
* Add hash (MurmurHash3) tests.Jason Evans2013-12-171-3/+3
| | | | Add hash tests that are based on SMHasher's VerificationTest() function.
* Add ckh unit tests.Jason Evans2013-12-171-3/+4
|
* Implement the *allocx() API.Jason Evans2013-12-131-2/+5
| | | | | | | | | | | | | | | | | | | | | | | 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);
* Add mq (message queue) to test infrastructure.Jason Evans2013-12-121-2/+4
| | | | | | | | | 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.
* Add probabability distribution utility code.Jason Evans2013-12-101-8/+8
| | | | | | | | | | | | | | | 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.
* Integrate SFMT 1.3.3 into test infrastructure.Jason Evans2013-12-091-1/+3
| | | | | | | | | | | | 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.
* Refactor tests.Jason Evans2013-12-091-2/+2
| | | | | | | 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.
* Add test code coverage analysis.Jason Evans2013-12-071-7/+49
| | | | Add test code coverage analysis based on gcov.
* Fix test refactoring issues for Linux.Jason Evans2013-12-061-2/+2
|
* Add tsd test.Jason Evans2013-12-051-1/+2
| | | | Submitted by Mike Hommey.
* Fix build target to be build_lib, as documented.Jason Evans2013-12-041-2/+2
| | | | Reported by Michael Truog.
* Refactor to support more varied testing.Jason Evans2013-12-041-78/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fix build break for MSVC.Jason Evans2013-08-201-2/+2
| | | | | | | | Introduce AROUT to control whether there is space between ARFLAGS and $@. This regression was introduced by ad505e0ec622883fbb0650763ea8b54f64a770c9. Reported by Mike Hommey.
* Allow toolchain to determine arJory A. Pratt2013-08-191-1/+3
|
* Update phony targets.Jason Evans2013-01-221-2/+2
| | | | Submitted by Frederik Deweerdt.
* Allow to disable the zone allocator on DarwinMike Hommey2012-12-231-1/+2
|
* Add arena-specific and selective dss allocation.Jason Evans2012-10-131-3/+3
| | | | | | | | | | | | | | | | | | | Add the "arenas.extend" mallctl, so that it is possible to create new arenas that are outside the set that jemalloc automatically multiplexes threads onto. Add the ALLOCM_ARENA() flag for {,r,d}allocm(), so that it is possible to explicitly allocate from a particular arena. Add the "opt.dss" mallctl, which controls the default precedence of dss allocation relative to mmap allocation. Add the "arena.<i>.dss" mallctl, which makes it possible to set the default dss precedence on a per arena or global basis. Add the "arena.<i>.purge" mallctl, which obsoletes "arenas.purge". Add the "stats.arenas.<i>.dss" mallctl.
* Use "hardcoded" dependencies when compiler doesn't support -MMMike Hommey2012-05-021-0/+14
|
* Add support for MSVCMike Hommey2012-05-011-4/+17
| | | | Tested with MSVC 8 32 and 64 bits.
* Don't link tests with superfluous libraries.Jason Evans2012-04-241-1/+1
| | | | | Don't link tests with libraries that only libjemalloc needs to be linked to.
* Clean up documentation and formatting.Jason Evans2012-04-231-2/+2
|
* Add support for MingwMike Hommey2012-04-221-3/+7
|
* Refactor object and library build, and only build PIC libraries when ↵Mike Hommey2012-04-181-35/+38
| | | | PIC_CFLAGS is defined
* Make versioned shared library suffix configurableMike Hommey2012-04-181-7/+14
| | | | | | | | This allows for different patterns for file names: - lib.so.version for e.g. Linux - lib.version.dylib for OSX (which is much more common than lib.dylib.version) - lib.dll for Windows (no version at all).
* Replace fprintf with malloc_printf in tests.Mike Hommey2012-04-171-2/+4
|
* Limit the number of flags directly given to the linker, and refactor rpathMike Hommey2012-04-171-12/+5
| | | | This will make things easier for MSVC support.
* Add variables for library prefix, and static library, object and executable ↵Mike Hommey2012-04-171-26/+32
| | | | | | suffixes This makes hacking on Makefile easier.
* Use make variables instead of preprocessingMike Hommey2012-04-171-93/+109
|
* Use $(LIBS) instead of -lpthread when linking testsMike Hommey2012-04-171-2/+2
| | | | This will allow linking for win32 without pthreads more easily
* Remove -dynamic CFLAG on OSXMike Hommey2012-04-171-3/+0
| | | | | It is a linker flag, so it doesn't make sense in CFLAGS, and it's the default when invoking the linker for shared libraries.
* Re-silence -MM compiler invocations.Jason Evans2012-04-131-3/+3
|
* Use -MT options to build dependency filesMike Hommey2012-04-121-3/+3
|
* Remove bogus dependencyMike Hommey2012-04-121-3/+0
| | | | | test/bitmap.c #includes src/bitmap.c, which is correctly detected by gcc -MM, but building test/bitmap.o doesn't require src/bitmap.o.
* Implement Valgrind support, redzones, and quarantine.Jason Evans2012-04-111-3/+3
| | | | | | | | | | | | | Implement Valgrind support, as well as the redzone and quarantine features, which help Valgrind detect memory errors. Redzones are only implemented for small objects because the changes necessary to support redzones around large and huge objects are complicated by in-place reallocation, to the point that it isn't clear that the maintenance burden is worth the incremental improvement to Valgrind support. Merge arena_salloc() and arena_salloc_demote(). Refactor i[v]salloc() to expose the 'demote' option.
* Ignore whitespaces when comparing test results with expected outputMike Hommey2012-04-101-1/+1
| | | | | In mingw, the test result may contain CRLF while the .exp files don't, or the other way around.
* Revert "Avoid NULL check in free() and malloc_usable_size()."Jason Evans2012-04-021-1/+1
| | | | | | | | | | This reverts commit 96d4120ac08db3f2d566e8e5c3bc134a24aa0afc. ivsalloc() depends on chunks_rtree being initialized. This can be worked around via a NULL pointer check. However, thread_allocated_tsd_get() also depends on initialization having occurred, and there is no way to guard its call in free() that is cheaper than checking whether ptr is NULL.
* Avoid NULL check in free() and malloc_usable_size().Jason Evans2012-04-021-1/+1
| | | | | | | | | Generalize isalloc() to handle NULL pointers in such a way that the NULL checking overhead is only paid when introspecting huge allocations (or NULL). This allows free() and malloc_usable_size() to no longer check for NULL. Submitted by Igor Bukanov and Mike Hommey.
* Add the "thread.tcache.enabled" mallctl.Jason Evans2012-03-271-1/+2
|
* Implement tsd.Jason Evans2012-03-231-1/+2
| | | | | | | | | | | | | Implement tsd, which is a TLS/TSD abstraction that uses one or both internally. Modify bootstrapping such that no tsd's are utilized until allocation is safe. Remove malloc_[v]tprintf(), and use malloc_snprintf() instead. Fix %p argument size handling in malloc_vsnprintf(). Fix a long-standing statistics-related bug in the "thread.arena" mallctl that could cause crashes due to linked list corruption.