mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-15 21:27:18 +03:00
Allow chunks to not be naturally aligned.
Precisely size extents for huge size classes that aren't multiples of chunksize.
This commit is contained in:
parent
741967e79d
commit
4731cd47f7
11 changed files with 105 additions and 268 deletions
|
|
@ -224,22 +224,6 @@ TEST_BEGIN(test_chunk)
|
|||
do_dalloc = true;
|
||||
do_decommit = false;
|
||||
|
||||
/* Test purge for partial-chunk huge allocations. */
|
||||
if (huge0 * 2 > huge2) {
|
||||
/*
|
||||
* There are at least four size classes per doubling, so a
|
||||
* successful xallocx() from size=huge2 to size=huge1 is
|
||||
* guaranteed to leave trailing purgeable memory.
|
||||
*/
|
||||
p = mallocx(huge2, flags);
|
||||
assert_ptr_not_null(p, "Unexpected mallocx() error");
|
||||
did_purge = false;
|
||||
assert_zu_eq(xallocx(p, huge1, 0, flags), huge1,
|
||||
"Unexpected xallocx() failure");
|
||||
assert_true(did_purge, "Expected purge");
|
||||
dallocx(p, flags);
|
||||
}
|
||||
|
||||
/* Test decommit for large allocations. */
|
||||
do_decommit = true;
|
||||
p = mallocx(large1, flags);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue