aboutsummaryrefslogtreecommitdiff
path: root/malloc/mtrace.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-12-22 20:10:10 +0000
committerUlrich Drepper <drepper@redhat.com>2004-12-22 20:10:10 +0000
commita334319f6530564d22e775935d9c91663623a1b4 (patch)
treeb5877475619e4c938e98757d518bb1e9cbead751 /malloc/mtrace.c
parent0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (diff)
downloadglibc-a334319f6530564d22e775935d9c91663623a1b4.tar
glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.gz
glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.bz2
glibc-a334319f6530564d22e775935d9c91663623a1b4.zip
(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
Diffstat (limited to 'malloc/mtrace.c')
-rw-r--r--malloc/mtrace.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/malloc/mtrace.c b/malloc/mtrace.c
index 139ebc8153..1a9522b09d 100644
--- a/malloc/mtrace.c
+++ b/malloc/mtrace.c
@@ -40,18 +40,6 @@
# include <libio/iolibio.h>
# define setvbuf(s, b, f, l) INTUSE(_IO_setvbuf) (s, b, f, l)
# define fwrite(buf, size, count, fp) _IO_fwrite (buf, size, count, fp)
-extern __typeof (malloc) __libc_malloc;
-extern __typeof (free) __libc_free;
-extern __typeof (realloc) __libc_realloc;
-libc_hidden_proto (__libc_malloc)
-libc_hidden_proto (__libc_realloc)
-libc_hidden_proto (__libc_free)
-libc_hidden_proto (__libc_memalign)
-#else
-# define __libc_malloc(sz) malloc (sz)
-# define __libc_free(ptr) free (ptr)
-# define __libc_realloc(ptr, sz) realloc (ptr, sz)
-# define __libc_memalign(al, sz) memalign (al, sz)
#endif
#ifndef attribute_hidden
@@ -166,7 +154,7 @@ tr_freehook (ptr, caller)
if (tr_old_free_hook != NULL)
(*tr_old_free_hook) (ptr, caller);
else
- __libc_free (ptr);
+ free (ptr);
__free_hook = tr_freehook;
__libc_lock_unlock (lock);
}
@@ -185,7 +173,7 @@ tr_mallochook (size, caller)
if (tr_old_malloc_hook != NULL)
hdr = (__ptr_t) (*tr_old_malloc_hook) (size, caller);
else
- hdr = (__ptr_t) __libc_malloc (size);
+ hdr = (__ptr_t) malloc (size);
__malloc_hook = tr_mallochook;
tr_where (caller);
@@ -221,7 +209,7 @@ tr_reallochook (ptr, size, caller)
if (tr_old_realloc_hook != NULL)
hdr = (__ptr_t) (*tr_old_realloc_hook) (ptr, size, caller);
else
- hdr = (__ptr_t) __libc_realloc (ptr, size);
+ hdr = (__ptr_t) realloc (ptr, size);
__free_hook = tr_freehook;
__malloc_hook = tr_mallochook;
__realloc_hook = tr_reallochook;
@@ -263,7 +251,7 @@ tr_memalignhook (alignment, size, caller)
if (tr_old_memalign_hook != NULL)
hdr = (__ptr_t) (*tr_old_memalign_hook) (alignment, size, caller);
else
- hdr = (__ptr_t) __libc_memalign (alignment, size);
+ hdr = (__ptr_t) memalign (alignment, size);
__memalign_hook = tr_memalignhook;
__malloc_hook = tr_mallochook;