mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-01 10:06:57 +03:00
Add probes for malloc arena changes.
for ChangeLog * malloc/arena.c (get_free_list): Add probe memory_arena_reuse_free_list. (reused_arena) [PER_THREAD]: Add probes memory_arena_reuse_wait and memory_arena_reuse. (arena_get2) [!PER_THREAD]: Likewise. * malloc/malloc.c (__libc_realloc) [!PER_THREAD]: Add probe memory_arena_reuse_realloc. * manual/probes.texi: Document them.
This commit is contained in:
@ -2977,6 +2977,7 @@ __libc_realloc(void* oldmem, size_t bytes)
|
||||
#endif
|
||||
|
||||
#if !defined PER_THREAD
|
||||
LIBC_PROBE (memory_arena_reuse_realloc, 1, ar_ptr);
|
||||
/* As in malloc(), remember this arena for the next allocation. */
|
||||
tsd_setspecific(arena_key, (void *)ar_ptr);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user