summaryrefslogtreecommitdiffstats
path: root/test/integration
Commit message (Collapse)AuthorAgeFilesLines
* Fix test/integration/extent.Qi Wang2017-12-091-1/+1
| | | | | Should only run the hook tests without background threads. This was introduced in 6e841f6.
* Add more tests for extent hooks failure paths.Qi Wang2017-11-291-3/+20
|
* Only run test/integration/sdallocx non-reentrantly.David Goldblatt2017-07-241-1/+1
| | | | | This is a temporary workaround until we add some beefier CI machines. Right now, we're seeing too many OOMs for this to be useful.
* Add alloc hook test in test/integration/extent.Qi Wang2017-06-141-0/+3
|
* Implementing opt.background_thread.Qi Wang2017-05-231-0/+14
| | | | | | | | | | | Added opt.background_thread to enable background threads, which handles purging currently. When enabled, decay ticks will not trigger purging (which will be left to the background threads). We limit the max number of threads to NCPUs. When percpu arena is enabled, set CPU affinity for the background threads as well. The sleep interval of background threads is dynamic and determined by computing number of pages to purge in the future (based on backlog).
* Remove --disable-tcache.Jason Evans2017-04-211-22/+3
| | | | | | | | | | | Simplify configuration by removing the --disable-tcache option, but replace the testing for that configuration with --with-malloc-conf=tcache:false. Fix the thread.arena and thread.tcache.flush mallctls to work correctly if tcache is disabled. This partially resolves #580.
* Implement per-CPU arena.Qi Wang2017-03-091-8/+17
| | | | | | | | | | | | | | | | | | The new feature, opt.percpu_arena, determines thread-arena association dynamically based CPU id. Three modes are supported: "percpu", "phycpu" and disabled. "percpu" uses the current core id (with help from sched_getcpu()) directly as the arena index, while "phycpu" will assign threads on the same physical CPU to the same arena. In other words, "percpu" means # of arenas == # of CPUs, while "phycpu" has # of arenas == 1/2 * (# of CPUs). Note that no runtime check on whether hyper threading is enabled is added yet. When enabled, threads will be migrated between arenas when a CPU change is detected. In the current design, to reduce overhead from reading CPU id, each arena tracks the thread accessed most recently. When a new thread comes in, we will read CPU id and update arena if necessary.
* Use MALLOC_CONF rather than malloc_conf for tests.Jason Evans2017-02-236-12/+15
| | | | | | | | | malloc_conf does not reliably work with MSVC, which complains of "inconsistent dll linkage", i.e. its inability to support the application overriding malloc_conf when dynamically linking/loading. Work around this limitation by adding test harness support for per test shell script sourcing, and converting all tests to use MALLOC_CONF instead of malloc_conf.
* Replace tabs following #define with spaces.Jason Evans2017-01-218-20/+20
| | | | This resolves #564.
* Remove extraneous parens around return arguments.Jason Evans2017-01-2113-49/+49
| | | | This resolves #540.
* Update brace style.Jason Evans2017-01-2113-169/+113
| | | | | | | Add braces around single-line blocks, and remove line breaks before function-opening braces. This resolves #537.
* Add nullptr support to sized delete operators.Jason Evans2017-01-171-0/+10
|
* Remove leading blank lines from function bodies.Jason Evans2017-01-1313-26/+0
| | | | This resolves #535.
* Refactor test extent hook code to be reusable.Jason Evans2017-01-071-244/+56
| | | | | | Move test extent hook code from the extent integration test into a header, and normalize the out-of-band controls and introspection. Also refactor the base unit test to use the header.
* Rename the arenas.extend mallctl to arenas.create.Jason Evans2017-01-073-5/+5
|
* Implement per arena base allocators.Jason Evans2016-12-271-46/+69
| | | | | | | | | | | | | Add/rename related mallctls: - Add stats.arenas.<i>.base . - Rename stats.arenas.<i>.metadata to stats.arenas.<i>.internal . - Add stats.arenas.<i>.resident . Modify the arenas.extend mallctl to take an optional (extent_hooks_t *) argument so that it is possible for all base allocations to be serviced by the specified extent hooks. This resolves #463.
* Refactor purging and splitting/merging.Jason Evans2016-12-271-16/+47
| | | | | | | | | | | | | | Split purging into lazy and forced variants. Use the forced variant for zeroing dss. Add support for NULL function pointers as an opt-out mechanism for the dalloc, commit, decommit, purge_lazy, purge_forced, split, and merge fields of extent_hooks_t. Add short-circuiting checks in large_ralloc_no_move_{shrink,expand}() so that no attempt is made if splitting/merging is not supported. This resolves #268.
* jemalloc cpp new/delete bindingsDave Watson2016-12-131-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds cpp bindings for jemalloc, along with necessary autoconf settings. This is mostly to add sized deallocation support, which can't be added from C directly. Sized deallocation is ~10% microbench improvement. * Import ax_cxx_compile_stdcxx.m4 from the autoconf repo, seems like the easiest way to get c++14 detection. * Adds various other changes, like CXXFLAGS, to configure.ac. * Adds new rules to Makefile.in for src/jemalloc-cpp.cpp, and a basic unittest. * Both new and delete are overridden, to ensure jemalloc is used for both. * TODO future enhancement of avoiding extra PLT thunks for new and delete - sdallocx and malloc are publicly exported jemalloc symbols, using an alias would link them directly. Unfortunately, was having trouble getting it to play nice with jemalloc's namespace support. Testing: Tested gcc 4.8, gcc 5, gcc 5.2, clang 4.0. Only gcc >= 5 has sized deallocation support, verified that the rest build correctly. Tested mac osx and Centos. Tested --with-jemalloc-prefix and --without-export. This resolves #202.
* Reduce memory usage for sdallocx() test_alignment_and_size.Jason Evans2016-11-121-2/+2
|
* Reduce memory requirements for regression tests.Jason Evans2016-10-283-35/+55
| | | | | | | This is intended to drop memory usage to a level that AppVeyor test instances can handle. This resolves #393.
* Periodically purge in memory-intensive integration tests.Jason Evans2016-10-281-0/+7
| | | | This resolves #393.
* Periodically purge in memory-intensive integration tests.Jason Evans2016-10-283-6/+27
| | | | This resolves #393.
* Uniformly cast mallctl[bymib]() oldp/newp arguments to (void *).Jason Evans2016-10-289-58/+63
| | | | | This avoids warnings in some cases, and is otherwise generally good hygiene.
* Verify extent hook functions receive correct extent_hooks pointer.Jason Evans2016-09-291-17/+52
|
* Relax extent hook tests to work with unsplittable extents.Jason Evans2016-06-061-8/+19
|
* Fix regressions related extent splitting failures.Jason Evans2016-06-061-3/+5
| | | | | | | | | | Fix a fundamental extent_split_wrapper() bug in an error path. Fix extent_recycle() to deregister unsplittable extents before leaking them. Relax xallocx() test assertions so that unsplittable extents don't cause test failures.
* Work around legitimate xallocx() failures during testing.Jason Evans2016-06-061-6/+12
| | | | | | | | | | With the removal of subchunk size class infrastructure, there are no large size classes that are guaranteed to be re-expandable in place unless munmap() is disabled. Work around these legitimate failures with rallocx() fallback calls. If there were no test configuration for which the xallocx() calls succeeded, it would be important to override the extent hooks for testing purposes, but by default these tests don't use the rallocx() fallbacks on Linux, so test coverage is still sufficient.
* Modify extent hook functions to take an (extent_t *) argument.Jason Evans2016-06-061-67/+84
| | | | | | | This facilitates the application accessing its own extent allocator metadata during hook invocations. This resolves #259.
* Reduce NSZS, since NSIZES (was nsizes) can not be so large.Jason Evans2016-06-061-1/+1
|
* Miscellaneous s/chunk/extent/ updates.Jason Evans2016-06-062-2/+0
|
* Rename most remaining *chunk* APIs to *extent*.Jason Evans2016-06-061-41/+41
|
* s/chunk_hook/extent_hook/gJason Evans2016-06-061-11/+11
|
* Rename huge to large.Jason Evans2016-06-065-90/+90
|
* Use huge size class infrastructure for large size classes.Jason Evans2016-06-062-125/+6
|
* Allow chunks to not be naturally aligned.Jason Evans2016-06-031-16/+0
| | | | | Precisely size extents for huge size classes that aren't multiples of chunksize.
* Disable junk filling for tests that could otherwise easily OOM.Jason Evans2016-05-112-0/+8
|
* 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.
* Use separate arena for chunk tests.Jason Evans2016-04-261-28/+45
| | | | | This assures that side effects of internal allocation don't impact tests.
* 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.
* 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.
* Cast PTRDIFF_MAX to size_t before adding 1.Jason Evans2016-02-262-8/+8
| | | | | | 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-252-1/+113
| | | | | | | 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-241-5/+5
|
* Don't rely on unpurged chunks in xallocx() test.Jason Evans2016-02-201-20/+20
|
* 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.
* Fix xallocx(..., MALLOCX_ZERO) bugs.Jason Evans2015-09-241-1/+118
| | | | | | | | | | Zero all trailing bytes of large allocations when --enable-cache-oblivious configure option is enabled. This regression was introduced by 8a03cf039cd06f9fa6972711195055d865673966 (Implement cache index randomization for large allocations.). Zero trailing bytes of huge allocations when resizing from/to a size class that is not a multiple of the chunk size.
* Add mallocx() OOM tests.Jason Evans2015-09-171-0/+70
|
* Loosen expected xallocx() results.Jason Evans2015-09-151-9/+9
| | | | | Systems that do not support chunk split/merge cannot shrink/grow huge allocations in place.