summaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Don't test fork() on Windows.Jason Evans2016-05-041-0/+6
|
* Update mallocx() OOM test to deal with smaller hugemax.Jason Evans2016-05-031-10/+19
| | | | | | | | | | | | | Depending on virtual memory resource limits, it is necessary to attempt allocating three maximally sized objects to trigger OOM rather than just two, since the maximum supported size is slightly less than half the total virtual memory address space. This fixes a test failure that was introduced by 0c516a00c4cb28cff55ce0995f756b5aae074c9e (Make *allocx() size class overflow behavior defined.). This resolves #379.
* Fix witness/fork() interactions.Jason Evans2016-04-261-3/+22
| | | | | | Fix witness to clear its list of owned mutexes in the child if platform-specific malloc_mutex code re-initializes mutexes rather than unlocking them.
* Fix fork()-related lock rank ordering reversals.Jason Evans2016-04-261-0/+39
|
* Use separate arena for chunk tests.Jason Evans2016-04-261-28/+45
| | | | | This assures that side effects of internal allocation don't impact tests.
* Fix arena_reset() test to avoid tcache.Jason Evans2016-04-251-10/+9
|
* Implement the arena.<i>.reset mallctl.Jason Evans2016-04-221-0/+160
| | | | | | | This makes it possible to discard all of an arena's allocations in a single operation. This resolves #146.
* Fix style nits.Jason Evans2016-04-173-4/+4
|
* Add witness, a simple online locking validator.Jason Evans2016-04-143-3/+282
| | | | This resolves #358.
* Fix more 64-to-32 conversion warnings.Jason Evans2016-04-122-11/+11
|
* Clean up char vs. uint8_t in junk filling code.Jason Evans2016-04-112-15/+17
| | | | Consistently use uint8_t rather than char for junk filling code.
* Refactor/fix ph.Jason Evans2016-04-111-20/+237
| | | | | | | | | | | | | | | | | | | | | Refactor ph to support configurable comparison functions. Use a cpp macro code generation form equivalent to the rb macros so that pairing heaps can be used for both run heaps and chunk heaps. Remove per node parent pointers, and instead use leftmost siblings' prev pointers to track parents. Fix multi-pass sibling merging to iterate over intermediate results using a FIFO, rather than a LIFO. Use this fixed sibling merging implementation for both merge phases of the auxiliary twopass algorithm (first merging the aux list, then replacing the root with its merged children). This fixes both degenerate merge behavior and the potential for deep recursion. This regression was introduced by 6bafa6678fc36483e638f1c3a0a9bf79fb89bfc9 (Pairing heap). This resolves #371.
* Fix a compilation warning in the ph test code.Jason Evans2016-04-051-20/+1
|
* Add JEMALLOC_ALLOC_JUNK and JEMALLOC_FREE_JUNK macrosChris Peterson2016-03-311-3/+3
| | | | | Replace hardcoded 0xa5 and 0x5a junk values with JEMALLOC_ALLOC_JUNK and JEMALLOC_FREE_JUNK macros, respectively.
* Avoid blindly enabling assertions for header code when testing.Jason Evans2016-03-231-33/+45
| | | | | | Restructure the test program master header to avoid blindly enabling assertions. Prior to this change, assertion code in e.g. arena.h was always enabled for tests, which could skew performance-related testing.
* Code formatting fixes.Jason Evans2016-03-231-1/+2
|
* Refactor out signed/unsigned comparisons.Jason Evans2016-03-153-9/+8
|
* Add (size_t) casts to MALLOCX_ALIGN().Jason Evans2016-03-111-13/+10
| | | | | | | | Add (size_t) casts to MALLOCX_ALIGN() macros so that passing the integer constant 0x80000000 does not cause a compiler warning about invalid shift amount. This resolves #354.
* Unittest for pairing heapDave Watson2016-03-081-0/+92
|
* Fix stack corruption and uninitialized var warningDmitri Smirnov2016-02-291-6/+7
| | | | | | Stack corruption happens in x64 bit This resolves #347.
* Fix decay tests for --disable-tcache case.Jason Evans2016-02-281-6/+14
|
* Fix stats.arenas.<i>.[...] for --disable-stats case.Jason Evans2016-02-281-1/+3
| | | | | | | | Add missing stats.arenas.<i>.{dss,lg_dirty_mult,decay_time} initialization. Fix stats.arenas.<i>.{pactive,pdirty} to read under the protection of the arena mutex.
* Fix decay tests for --disable-stats case.Jason Evans2016-02-281-11/+18
|
* Remove invalid tests.Jason Evans2016-02-272-18/+2
| | | | | Remove invalid tests that were intended to be tests of (hugemax+1) OOM, for which tests already exist.
* Miscellaneous bitmap refactoring.Jason Evans2016-02-261-9/+13
|
* Cast PTRDIFF_MAX to size_t before adding 1.Jason Evans2016-02-263-10/+10
| | | | | | This fixes compilation warnings regarding integer overflow that were introduced by 0c516a00c4cb28cff55ce0995f756b5aae074c9e (Make *allocx() size class overflow behavior defined.).
* Make *allocx() size class overflow behavior defined.Jason Evans2016-02-253-2/+137
| | | | | | | Limit supported size and alignment to HUGE_MAXCLASS, which in turn is now limited to be less than PTRDIFF_MAX. This resolves #278 and #295.
* Silence miscellaneous 64-to-32-bit data loss warnings.Jason Evans2016-02-242-7/+7
|
* Make opt_narenas unsigned rather than size_t.Jason Evans2016-02-241-1/+1
|
* Fix Windows build issuesDmitri Smirnov2016-02-242-4/+0
| | | | This resolves #333.
* Remove rbt_nilDave Watson2016-02-241-19/+22
| | | | | Since this is an intrusive tree, rbt_nil is the whole size of the node and can be quite large. For example, miscelm is ~100 bytes.
* Use table lookup for run_quantize_{floor,ceil}().Jason Evans2016-02-231-10/+2
| | | | | Reduce run quantization overhead by generating lookup tables during bootstrapping, and using the tables for all subsequent run quantization.
* Test run quantization.Jason Evans2016-02-221-0/+157
| | | | | Also rename run_quantize_*() to improve clarity. These tests demonstrate that run_quantize_ceil() is flawed.
* Refactor time_* into nstime_*.Jason Evans2016-02-227-260/+257
| | | | | | | Use a single uint64_t in nstime_t to store nanoseconds rather than using struct timespec. This reduces fragility around conversions between long and uint64_t, especially missing casts that only cause problems on 32-bit platforms.
* Handle unaligned keys in hash().Jason Evans2016-02-201-3/+16
| | | | Reported by Christopher Ferris <cferris@google.com>.
* Increase test coverage in test_decay_ticks.Jason Evans2016-02-201-123/+98
|
* Implement decay-based unused dirty page purging.Jason Evans2016-02-202-0/+465
| | | | | | | | | | | | | | | | This is an alternative to the existing ratio-based unused dirty page purging, and is intended to eventually become the sole purging mechanism. Add mallctls: - opt.purge - opt.decay_time - arena.<i>.decay - arena.<i>.decay_time - arenas.decay_time - stats.arenas.<i>.decay_time This resolves #325.
* Implement smoothstep table generation.Jason Evans2016-02-201-0/+106
| | | | | | Check in a generated smootherstep table as smoothstep.h rather than generating it at configure time, since not all systems (e.g. Windows) have dc.
* Refactor prng* from cpp macros into inline functions.Jason Evans2016-02-202-23/+114
| | | | | Remove 32-bit variant, convert prng64() to prng_lg_range(), and add prng_range().
* Implement ticker.Jason Evans2016-02-201-0/+76
| | | | | Implement ticker, which provides a simple API for ticking off some number of events before indicating that the ticker has hit its limit.
* Flesh out time_*() API.Jason Evans2016-02-204-49/+214
|
* Add time_update().Cameron Evans2016-02-201-0/+23
|
* Add --with-malloc-conf.Jason Evans2016-02-201-16/+17
| | | | | Add --with-malloc-conf, which makes it possible to embed a default options string during configuration.
* Fix test_stats_arenas_summary fragility.Jason Evans2016-02-201-4/+4
| | | | | Fix test_stats_arenas_summary to deallocate before asserting that purging must have happened.
* Don't rely on unpurged chunks in xallocx() test.Jason Evans2016-02-201-20/+20
|
* Add test for tree destructionJoshua Kahn2015-11-091-1/+16
|
* Allow const keys for lookupJoshua Kahn2015-11-091-1/+1
| | | | | | Signed-off-by: Steve Dougherty <sdougherty@barracuda.com> This resolves #281.
* Fix intermittent xallocx() test failures.Jason Evans2015-10-011-43/+65
| | | | | | | | Modify xallocx() tests that expect to expand in place to use a separate arena. This avoids the potential for interposed internal allocations from e.g. heap profile sampling to disrupt the tests. This resolves #286.
* Remove fragile xallocx() test case.Jason Evans2015-09-251-9/+0
| | | | | In addition to depending on map coalescing, the test depended on munmap() being disabled so that chunk recycling would always succeed.
* 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.