Hooks: move the "extra" pointer into the hook_t itself.

This simplifies the mallctl call to install a hook, which should only take a
single argument.
This commit is contained in:
David Goldblatt
2018-04-26 15:46:08 -07:00
committed by David Goldblatt
parent cb0707c0fc
commit 126e9a84a5
3 changed files with 31 additions and 31 deletions

View File

@@ -103,6 +103,7 @@ struct hooks_s {
hook_alloc alloc_hook;
hook_dalloc dalloc_hook;
hook_expand expand_hook;
void *extra;
};
/*
@@ -142,7 +143,7 @@ struct hook_ralloc_args_s {
*/
bool hook_boot();
void *hook_install(tsdn_t *tsdn, hooks_t *hooks, void *extra);
void *hook_install(tsdn_t *tsdn, hooks_t *hooks);
/* Uninstalls the hook with the handle previously returned from hook_install. */
void hook_remove(tsdn_t *tsdn, void *opaque);