summaryrefslogtreecommitdiff
path: root/deps/jemalloc/test/integration/allocated.c
diff options
context:
space:
mode:
Diffstat (limited to 'deps/jemalloc/test/integration/allocated.c')
-rw-r--r--deps/jemalloc/test/integration/allocated.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/deps/jemalloc/test/integration/allocated.c b/deps/jemalloc/test/integration/allocated.c
index 1425fd0aa..0c64272ce 100644
--- a/deps/jemalloc/test/integration/allocated.c
+++ b/deps/jemalloc/test/integration/allocated.c
@@ -32,7 +32,7 @@ thd_start(void *arg) {
test_fail("%s(): Error in mallctl(): %s", __func__,
strerror(err));
}
- assert_u64_eq(*ap0, a0,
+ expect_u64_eq(*ap0, a0,
"\"thread.allocatedp\" should provide a pointer to internal "
"storage");
@@ -53,25 +53,25 @@ thd_start(void *arg) {
test_fail("%s(): Error in mallctl(): %s", __func__,
strerror(err));
}
- assert_u64_eq(*dp0, d0,
+ expect_u64_eq(*dp0, d0,
"\"thread.deallocatedp\" should provide a pointer to internal "
"storage");
p = malloc(1);
- assert_ptr_not_null(p, "Unexpected malloc() error");
+ expect_ptr_not_null(p, "Unexpected malloc() error");
sz = sizeof(a1);
mallctl("thread.allocated", (void *)&a1, &sz, NULL, 0);
sz = sizeof(ap1);
mallctl("thread.allocatedp", (void *)&ap1, &sz, NULL, 0);
- assert_u64_eq(*ap1, a1,
+ expect_u64_eq(*ap1, a1,
"Dereferenced \"thread.allocatedp\" value should equal "
"\"thread.allocated\" value");
- assert_ptr_eq(ap0, ap1,
+ expect_ptr_eq(ap0, ap1,
"Pointer returned by \"thread.allocatedp\" should not change");
- usize = malloc_usable_size(p);
- assert_u64_le(a0 + usize, a1,
+ usize = TEST_MALLOC_SIZE(p);
+ expect_u64_le(a0 + usize, a1,
"Allocated memory counter should increase by at least the amount "
"explicitly allocated");
@@ -81,19 +81,19 @@ thd_start(void *arg) {
mallctl("thread.deallocated", (void *)&d1, &sz, NULL, 0);
sz = sizeof(dp1);
mallctl("thread.deallocatedp", (void *)&dp1, &sz, NULL, 0);
- assert_u64_eq(*dp1, d1,
+ expect_u64_eq(*dp1, d1,
"Dereferenced \"thread.deallocatedp\" value should equal "
"\"thread.deallocated\" value");
- assert_ptr_eq(dp0, dp1,
+ expect_ptr_eq(dp0, dp1,
"Pointer returned by \"thread.deallocatedp\" should not change");
- assert_u64_le(d0 + usize, d1,
+ expect_u64_le(d0 + usize, d1,
"Deallocated memory counter should increase by at least the amount "
"explicitly deallocated");
return NULL;
label_ENOENT:
- assert_false(config_stats,
+ expect_false(config_stats,
"ENOENT should only be returned if stats are disabled");
test_skip("\"thread.allocated\" mallctl not available");
return NULL;