MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / extent_destroy_hook

Function extent_destroy_hook

deps/jemalloc/test/include/test/extent_hooks.h:124–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124static void
125extent_destroy_hook(extent_hooks_t *extent_hooks, void *addr, size_t size,
126 bool committed, unsigned arena_ind) {
127 TRACE_HOOK("%s(extent_hooks=%p, addr=%p, size=%zu, committed=%s, "
128 "arena_ind=%u)\n", __func__, extent_hooks, addr, size, committed ?
129 "true" : "false", arena_ind);
130 assert_ptr_eq(extent_hooks, &hooks,
131 "extent_hooks should be same as pointer used to set hooks");
132 assert_ptr_eq(extent_hooks->destroy, extent_destroy_hook,
133 "Wrong hook function");
134 called_destroy = true;
135 if (!try_destroy) {
136 return;
137 }
138 default_hooks->destroy(default_hooks, addr, size, committed, 0);
139 did_destroy = true;
140}
141
142static bool
143extent_commit_hook(extent_hooks_t *extent_hooks, void *addr, size_t size,

Callers

nothing calls this directly

Calls 1

destroyMethod · 0.45

Tested by

no test coverage detected