mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
[BZ #9957]
2009-04-16 Ulrich Drepper <drepper@redhat.com> [BZ #9957] * malloc/malloc.c (force_reg): Define. (sYSMALLOc): Load hook variable into variable before test and force into register. (sYSTRIm): Likewise. (public_mALLOc): Force hook value into register. (public_fREe): Likewise. (public_rEALLOc): Likewise. (public_mEMALIGn): Likewise. (public_vALLOc): Likewise. (public_pVALLOc): Likewise. (public_cALLOc): Likewise. (__posix_memalign): Likewise. * malloc/arena.c (ptmalloc_init): Load hook variable into variable before test and force into register. * malloc/hooks.c (top_check): Likewise. (public_s_ET_STATe): Pretty printing. * resolv/res_send.c (send_dg): Don't just ignore the result we got in case we only receive one reply in single-request mode.
This commit is contained in:
@ -235,8 +235,9 @@ top_check()
|
||||
return -1;
|
||||
}
|
||||
/* Call the `morecore' hook if necessary. */
|
||||
if (__after_morecore_hook)
|
||||
(*__after_morecore_hook) ();
|
||||
void (*hook) (void) = __after_morecore_hook;
|
||||
if (hook)
|
||||
(*hook) ();
|
||||
main_arena.system_mem = (new_brk - mp_.sbrk_base) + sbrk_size;
|
||||
|
||||
top(&main_arena) = (mchunkptr)(brk + front_misalign);
|
||||
@ -669,10 +670,10 @@ public_sET_STATe(Void_t* msptr)
|
||||
!disallow_malloc_check)
|
||||
__malloc_check_init ();
|
||||
else if (!ms->using_malloc_checking && using_malloc_checking) {
|
||||
__malloc_hook = 0;
|
||||
__free_hook = 0;
|
||||
__realloc_hook = 0;
|
||||
__memalign_hook = 0;
|
||||
__malloc_hook = NULL;
|
||||
__free_hook = NULL;
|
||||
__realloc_hook = NULL;
|
||||
__memalign_hook = NULL;
|
||||
using_malloc_checking = 0;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user