summaryrefslogtreecommitdiffstats
path: root/test/integration/xallocx.c
Commit message (Collapse)AuthorAgeFilesLines
* Use MALLOC_CONF rather than malloc_conf for tests.Jason Evans2017-02-231-4/+0
| | | | | | | | | 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-211-1/+1
| | | | This resolves #564.
* Remove extraneous parens around return arguments.Jason Evans2017-01-211-10/+10
| | | | This resolves #540.
* Update brace style.Jason Evans2017-01-211-40/+23
| | | | | | | Add braces around single-line blocks, and remove line breaks before function-opening braces. This resolves #537.
* Remove leading blank lines from function bodies.Jason Evans2017-01-131-5/+0
| | | | This resolves #535.
* Rename the arenas.extend mallctl to arenas.create.Jason Evans2017-01-071-1/+1
|
* Uniformly cast mallctl[bymib]() oldp/newp arguments to (void *).Jason Evans2016-10-281-4/+4
| | | | | This avoids warnings in some cases, and is otherwise generally good hygiene.
* 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.
* Rename huge to large.Jason Evans2016-06-061-52/+52
|
* Use huge size class infrastructure for large size classes.Jason Evans2016-06-061-99/+4
|
* Disable junk filling for tests that could otherwise easily OOM.Jason Evans2016-05-111-0/+4
|
* 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.
* 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.
* 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.
* Add more xallocx() overflow tests.Jason Evans2015-09-151-0/+64
|
* Fix xallocx() bugs.Jason Evans2015-09-121-1/+241
| | | | | Fix xallocx() bugs related to the 'extra' parameter when specified as non-zero.
* Implement the *allocx() API.Jason Evans2013-12-131-0/+59
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);