From e6574c9ca263afb7d408dd5ebf09ad8cb0178469 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Jul 2000 17:18:38 +0000 Subject: Update. 2000-07-18 Kaz Kylheku * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed bug whereby thr field of waitnode structure would not be correctly set unless a null self pointer is passed to the functions. Eliminated redundant calls to thread_self(). --- malloc/malloc.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'malloc/malloc.c') diff --git a/malloc/malloc.c b/malloc/malloc.c index f2246f6184..981aae690d 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -2678,7 +2678,7 @@ Void_t* mALLOc(bytes) size_t bytes; Void_t* result; #if defined __GNUC__ && __GNUC__ >= 2 - result = (*__malloc_hook)(bytes, __builtin_return_address (0)); + result = (*__malloc_hook)(bytes, RETURN_ADDRESS (0)); #else result = (*__malloc_hook)(bytes, NULL); #endif @@ -2996,7 +2996,7 @@ void fREe(mem) Void_t* mem; #if defined _LIBC || defined MALLOC_HOOKS if (__free_hook != NULL) { #if defined __GNUC__ && __GNUC__ >= 2 - (*__free_hook)(mem, __builtin_return_address (0)); + (*__free_hook)(mem, RETURN_ADDRESS (0)); #else (*__free_hook)(mem, NULL); #endif @@ -3201,7 +3201,7 @@ Void_t* rEALLOc(oldmem, bytes) Void_t* oldmem; size_t bytes; Void_t* result; #if defined __GNUC__ && __GNUC__ >= 2 - result = (*__realloc_hook)(oldmem, bytes, __builtin_return_address (0)); + result = (*__realloc_hook)(oldmem, bytes, RETURN_ADDRESS (0)); #else result = (*__realloc_hook)(oldmem, bytes, NULL); #endif @@ -3478,8 +3478,7 @@ Void_t* mEMALIGn(alignment, bytes) size_t alignment; size_t bytes; Void_t* result; #if defined __GNUC__ && __GNUC__ >= 2 - result = (*__memalign_hook)(alignment, bytes, - __builtin_return_address (0)); + result = (*__memalign_hook)(alignment, bytes, RETURN_ADDRESS (0)); #else result = (*__memalign_hook)(alignment, bytes, NULL); #endif @@ -3671,7 +3670,7 @@ Void_t* cALLOc(n, elem_size) size_t n; size_t elem_size; if (__malloc_hook != NULL) { sz = n * elem_size; #if defined __GNUC__ && __GNUC__ >= 2 - mem = (*__malloc_hook)(sz, __builtin_return_address (0)); + mem = (*__malloc_hook)(sz, RETURN_ADDRESS (0)); #else mem = (*__malloc_hook)(sz, NULL); #endif -- cgit v1.2.3