From bdcf40a6208962008010c30463dc7dbddf3fc564 Mon Sep 17 00:00:00 2001 From: Qi Wang Date: Tue, 13 Jun 2017 16:35:35 -0700 Subject: Add alloc hook test in test/integration/extent. --- test/integration/extent.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- cgit v0.12