summaryrefslogtreecommitdiffstats
path: root/test/integration/overflow.c
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2017-06-13 19:49:58 (GMT)
committerJason Evans <jasone@canonware.com>2017-06-13 19:51:09 (GMT)
commit5018fe3f0979b7f9db9930accdf7ee31071fd703 (patch)
tree894055b5ff4ccde3d9d782861d45af4664f12ad2 /test/integration/overflow.c
parent04380e79f1e2428bd0ad000bbc6e3d2dfc6b66a5 (diff)
parentba29113e5a58caeb6b4a65b1db6d8efae79cae45 (diff)
downloadjemalloc-5.0.0.zip
jemalloc-5.0.0.tar.gz
jemalloc-5.0.0.tar.bz2
Merge branch 'dev'5.0.0
Diffstat (limited to 'test/integration/overflow.c')
-rw-r--r--test/integration/overflow.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/test/integration/overflow.c b/test/integration/overflow.c
index 84a3565..6a9785b 100644
--- a/test/integration/overflow.c
+++ b/test/integration/overflow.c
@@ -1,20 +1,19 @@
#include "test/jemalloc_test.h"
-TEST_BEGIN(test_overflow)
-{
- unsigned nhchunks;
+TEST_BEGIN(test_overflow) {
+ unsigned nlextents;
size_t mib[4];
size_t sz, miblen, max_size_class;
void *p;
sz = sizeof(unsigned);
- assert_d_eq(mallctl("arenas.nhchunks", (void *)&nhchunks, &sz, NULL, 0),
- 0, "Unexpected mallctl() error");
+ assert_d_eq(mallctl("arenas.nlextents", (void *)&nlextents, &sz, NULL,
+ 0), 0, "Unexpected mallctl() error");
miblen = sizeof(mib) / sizeof(size_t);
- assert_d_eq(mallctlnametomib("arenas.hchunk.0.size", mib, &miblen), 0,
+ assert_d_eq(mallctlnametomib("arenas.lextent.0.size", mib, &miblen), 0,
"Unexpected mallctlnametomib() error");
- mib[2] = nhchunks - 1;
+ mib[2] = nlextents - 1;
sz = sizeof(size_t);
assert_d_eq(mallctlbymib(mib, miblen, (void *)&max_size_class, &sz,
@@ -41,9 +40,7 @@ TEST_BEGIN(test_overflow)
TEST_END
int
-main(void)
-{
-
- return (test(
- test_overflow));
+main(void) {
+ return test(
+ test_overflow);
}