mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-29 14:22:14 +03:00
Skip default tcache testing if !opt_tcache.
This commit is contained in:
parent
fa35463d56
commit
596b479d83
1 changed files with 4 additions and 4 deletions
|
|
@ -210,12 +210,12 @@ TEST_BEGIN(test_manpage_example) {
|
|||
TEST_END
|
||||
|
||||
TEST_BEGIN(test_tcache_none) {
|
||||
void *p0, *q, *p1;
|
||||
test_skip_if(!opt_tcache);
|
||||
|
||||
/* Allocate p and q. */
|
||||
p0 = mallocx(42, 0);
|
||||
void *p0 = mallocx(42, 0);
|
||||
assert_ptr_not_null(p0, "Unexpected mallocx() failure");
|
||||
q = mallocx(42, 0);
|
||||
void *q = mallocx(42, 0);
|
||||
assert_ptr_not_null(q, "Unexpected mallocx() failure");
|
||||
|
||||
/* Deallocate p and q, but bypass the tcache for q. */
|
||||
|
|
@ -223,7 +223,7 @@ TEST_BEGIN(test_tcache_none) {
|
|||
dallocx(q, MALLOCX_TCACHE_NONE);
|
||||
|
||||
/* Make sure that tcache-based allocation returns p, not q. */
|
||||
p1 = mallocx(42, 0);
|
||||
void *p1 = mallocx(42, 0);
|
||||
assert_ptr_not_null(p1, "Unexpected mallocx() failure");
|
||||
assert_ptr_eq(p0, p1, "Expected tcache to allocate cached region");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue