summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQi Wang <interwq@gwu.edu>2017-06-13 23:35:35 (GMT)
committerQi Wang <interwq@gmail.com>2017-06-14 16:34:29 (GMT)
commitbdcf40a6208962008010c30463dc7dbddf3fc564 (patch)
treeccf0c372af7747e3434b6e39b067fea8273fe1fc
parentd955d6f2be7f17ba1f9a81f457e72565474cf18d (diff)
downloadjemalloc-bdcf40a6208962008010c30463dc7dbddf3fc564.zip
jemalloc-bdcf40a6208962008010c30463dc7dbddf3fc564.tar.gz
jemalloc-bdcf40a6208962008010c30463dc7dbddf3fc564.tar.bz2
Add alloc hook test in test/integration/extent.
-rw-r--r--test/integration/extent.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/integration/extent.c b/test/integration/extent.c
index 7262b80..1dcf217 100644
--- a/test/integration/extent.c
+++ b/test/integration/extent.c
@@ -39,10 +39,13 @@ test_extent_body(unsigned arena_ind) {
assert_d_eq(mallctlnametomib("arena.0.purge", purge_mib, &purge_miblen),
0, "Unexpected mallctlnametomib() failure");
purge_mib[1] = (size_t)arena_ind;
+ called_alloc = false;
+ try_alloc = true;
try_dalloc = false;
try_decommit = false;
p = mallocx(large0 * 2, flags);
assert_ptr_not_null(p, "Unexpected mallocx() error");
+ assert_true(called_alloc, "Expected alloc call");
called_dalloc = false;
called_decommit = false;
did_purge_lazy = false;