mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-30 15:08:06 +03:00
Hooks: hook the pure-expand function.
This commit is contained in:
parent
c154f5881b
commit
83e516154c
2 changed files with 37 additions and 1 deletions
|
|
@ -2942,6 +2942,12 @@ je_xallocx(void *ptr, size_t size, size_t extra, int flags) {
|
|||
*tsd_thread_deallocatedp_get(tsd) += old_usize;
|
||||
}
|
||||
label_not_resized:
|
||||
if (unlikely(!tsd_fast(tsd))) {
|
||||
uintptr_t args[4] = {(uintptr_t)ptr, size, extra, flags};
|
||||
hook_invoke_expand(hook_expand_xallocx, ptr, old_usize,
|
||||
usize, (uintptr_t)usize, args);
|
||||
}
|
||||
|
||||
UTRACE(ptr, size, ptr);
|
||||
check_entry_exit_locking(tsd_tsdn(tsd));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue