mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-14 04:37:18 +03:00
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:
parent
cb0707c0fc
commit
126e9a84a5
3 changed files with 31 additions and 31 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue