summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2016-05-31 22:03:51 (GMT)
committerJason Evans <jasone@canonware.com>2016-06-06 03:42:23 (GMT)
commit9c305c9e5c485c09100a17106c6562f8352a760d (patch)
treea93f1312a76571331ebce34c48516d51b7ed18ae /test
parent7d63fed0fd0bb10bd250e40c35558f67f26469cd (diff)
downloadjemalloc-9c305c9e5c485c09100a17106c6562f8352a760d.zip
jemalloc-9c305c9e5c485c09100a17106c6562f8352a760d.tar.gz
jemalloc-9c305c9e5c485c09100a17106c6562f8352a760d.tar.bz2
s/chunk_hook/extent_hook/g
Diffstat (limited to 'test')
-rw-r--r--test/integration/chunk.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/test/integration/chunk.c b/test/integration/chunk.c
index ca87e80..10c4ba7 100644
--- a/test/integration/chunk.c
+++ b/test/integration/chunk.c
@@ -4,8 +4,8 @@
const char *malloc_conf = "junk:false";
#endif
-static chunk_hooks_t orig_hooks;
-static chunk_hooks_t old_hooks;
+static extent_hooks_t orig_hooks;
+static extent_hooks_t old_hooks;
static bool do_dalloc = true;
static bool do_decommit;
@@ -125,7 +125,7 @@ TEST_BEGIN(test_chunk)
int flags;
size_t hooks_mib[3], purge_mib[3];
size_t hooks_miblen, purge_miblen;
- chunk_hooks_t new_hooks = {
+ extent_hooks_t new_hooks = {
chunk_alloc,
chunk_dalloc,
chunk_commit,
@@ -141,15 +141,15 @@ TEST_BEGIN(test_chunk)
"Unexpected mallctl() failure");
flags = MALLOCX_ARENA(arena_ind) | MALLOCX_TCACHE_NONE;
- /* Install custom chunk hooks. */
+ /* Install custom extent hooks. */
hooks_miblen = sizeof(hooks_mib)/sizeof(size_t);
- assert_d_eq(mallctlnametomib("arena.0.chunk_hooks", hooks_mib,
+ assert_d_eq(mallctlnametomib("arena.0.extent_hooks", hooks_mib,
&hooks_miblen), 0, "Unexpected mallctlnametomib() failure");
hooks_mib[1] = (size_t)arena_ind;
- old_size = sizeof(chunk_hooks_t);
- new_size = sizeof(chunk_hooks_t);
+ old_size = sizeof(extent_hooks_t);
+ new_size = sizeof(extent_hooks_t);
assert_d_eq(mallctlbymib(hooks_mib, hooks_miblen, &old_hooks, &old_size,
- &new_hooks, new_size), 0, "Unexpected chunk_hooks error");
+ &new_hooks, new_size), 0, "Unexpected extent_hooks error");
orig_hooks = old_hooks;
assert_ptr_ne(old_hooks.alloc, chunk_alloc, "Unexpected alloc error");
assert_ptr_ne(old_hooks.dalloc, chunk_dalloc,
@@ -223,11 +223,11 @@ TEST_BEGIN(test_chunk)
assert_ptr_not_null(p, "Unexpected mallocx() error");
dallocx(p, flags);
- /* Restore chunk hooks. */
+ /* Restore extent hooks. */
assert_d_eq(mallctlbymib(hooks_mib, hooks_miblen, NULL, NULL,
- &old_hooks, new_size), 0, "Unexpected chunk_hooks error");
+ &old_hooks, new_size), 0, "Unexpected extent_hooks error");
assert_d_eq(mallctlbymib(hooks_mib, hooks_miblen, &old_hooks, &old_size,
- NULL, 0), 0, "Unexpected chunk_hooks error");
+ NULL, 0), 0, "Unexpected extent_hooks error");
assert_ptr_eq(old_hooks.alloc, orig_hooks.alloc,
"Unexpected alloc error");
assert_ptr_eq(old_hooks.dalloc, orig_hooks.dalloc,