aboutsummaryrefslogtreecommitdiff
path: root/malloc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-09-08 08:12:39 +0000
committerUlrich Drepper <drepper@redhat.com>2004-09-08 08:12:39 +0000
commit06d6611aacdfcbc0bea3033b59b6bb2e35491fef (patch)
treec3aa81b51a11f7129fae9753fd6fe065d725fb58 /malloc
parent590b40f7ec801ea1b4be47112a016ed369041e64 (diff)
downloadglibc-06d6611aacdfcbc0bea3033b59b6bb2e35491fef.zip
glibc-06d6611aacdfcbc0bea3033b59b6bb2e35491fef.tar.gz
glibc-06d6611aacdfcbc0bea3033b59b6bb2e35491fef.tar.bz2
Update.
2004-09-08 Ulrich Drepper <drepper@redhat.com> * malloc/arena.c: Remove __MALLOC_P uses. * malloc/malloc.c: Likewise. * malloc/mtrace.c: Remove __P uses. * malloc/mcheck-init.c: Likewise.
Diffstat (limited to 'malloc')
-rw-r--r--malloc/arena.c25
-rw-r--r--malloc/malloc.c23
-rw-r--r--malloc/mcheck-init.c6
-rw-r--r--malloc/mtrace.c18
4 files changed, 33 insertions, 39 deletions
diff --git a/malloc/arena.c b/malloc/arena.c
index fb7b92f..16574e1 100644
--- a/malloc/arena.c
+++ b/malloc/arena.c
@@ -1,5 +1,5 @@
/* Malloc implementation for multiple threads without lock contention.
- Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Wolfram Gloger <wg@malloc.de>, 2001.
@@ -134,15 +134,14 @@ int __malloc_initialized = -1;
/* atfork support. */
-static __malloc_ptr_t (*save_malloc_hook) __MALLOC_P ((size_t __size,
- __const __malloc_ptr_t));
+static __malloc_ptr_t (*save_malloc_hook) (size_t __size,
+ __const __malloc_ptr_t);
# if !defined _LIBC || !defined USE_TLS || (defined SHARED && !USE___THREAD)
-static __malloc_ptr_t (*save_memalign_hook) __MALLOC_P ((size_t __align,
- size_t __size,
- __const __malloc_ptr_t));
+static __malloc_ptr_t (*save_memalign_hook) (size_t __align, size_t __size,
+ __const __malloc_ptr_t);
# endif
-static void (*save_free_hook) __MALLOC_P ((__malloc_ptr_t __ptr,
- __const __malloc_ptr_t));
+static void (*save_free_hook) (__malloc_ptr_t __ptr,
+ __const __malloc_ptr_t);
static Void_t* save_arena;
/* Magic value for the thread-specific arena pointer when
@@ -216,7 +215,7 @@ free_atfork(Void_t* mem, const Void_t *caller)
malloc/free internally (e.g. in LinuxThreads). */
static void
-ptmalloc_lock_all __MALLOC_P((void))
+ptmalloc_lock_all (void)
{
mstate ar_ptr;
@@ -238,7 +237,7 @@ ptmalloc_lock_all __MALLOC_P((void))
}
static void
-ptmalloc_unlock_all __MALLOC_P((void))
+ptmalloc_unlock_all (void)
{
mstate ar_ptr;
@@ -263,7 +262,7 @@ ptmalloc_unlock_all __MALLOC_P((void))
installed for the child. */
static void
-ptmalloc_unlock_all2 __MALLOC_P((void))
+ptmalloc_unlock_all2 (void)
{
mstate ar_ptr;
@@ -329,7 +328,7 @@ next_env_entry (char ***position)
/* Set up basic state so that _int_malloc et al can work. */
static void
-ptmalloc_init_minimal __MALLOC_P((void))
+ptmalloc_init_minimal (void)
{
#if DEFAULT_TOP_PAD != 0
mp_.top_pad = DEFAULT_TOP_PAD;
@@ -373,7 +372,7 @@ __libc_malloc_pthread_startup (bool first_time)
#endif
static void
-ptmalloc_init __MALLOC_P((void))
+ptmalloc_init (void)
{
#if __STD_C
const char* s;
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 206be50..5636d5c 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -2320,18 +2320,18 @@ static Void_t* realloc_hook_ini __MALLOC_P ((Void_t* ptr, size_t sz,
static Void_t* memalign_hook_ini __MALLOC_P ((size_t alignment, size_t sz,
const __malloc_ptr_t caller));
-void weak_variable (*__malloc_initialize_hook) __MALLOC_P ((void)) = NULL;
-void weak_variable (*__free_hook) __MALLOC_P ((__malloc_ptr_t __ptr,
- const __malloc_ptr_t)) = NULL;
+void weak_variable (*__malloc_initialize_hook) (void) = NULL;
+void weak_variable (*__free_hook) (__malloc_ptr_t __ptr,
+ const __malloc_ptr_t) = NULL;
__malloc_ptr_t weak_variable (*__malloc_hook)
- __MALLOC_P ((size_t __size, const __malloc_ptr_t)) = malloc_hook_ini;
+ (size_t __size, const __malloc_ptr_t) = malloc_hook_ini;
__malloc_ptr_t weak_variable (*__realloc_hook)
- __MALLOC_P ((__malloc_ptr_t __ptr, size_t __size, const __malloc_ptr_t))
+ (__malloc_ptr_t __ptr, size_t __size, const __malloc_ptr_t)
= realloc_hook_ini;
__malloc_ptr_t weak_variable (*__memalign_hook)
- __MALLOC_P ((size_t __alignment, size_t __size, const __malloc_ptr_t))
+ (size_t __alignment, size_t __size, const __malloc_ptr_t)
= memalign_hook_ini;
-void weak_variable (*__after_morecore_hook) __MALLOC_P ((void)) = NULL;
+void weak_variable (*__after_morecore_hook) (void) = NULL;
/* ---------------- Error behavior ------------------------------------ */
@@ -3313,8 +3313,7 @@ public_mALLOc(size_t bytes)
mstate ar_ptr;
Void_t *victim;
- __malloc_ptr_t (*hook) __MALLOC_P ((size_t, __const __malloc_ptr_t)) =
- __malloc_hook;
+ __malloc_ptr_t (*hook) (size_t, __const __malloc_ptr_t) = __malloc_hook;
if (hook != NULL)
return (*hook)(bytes, RETURN_ADDRESS (0));
@@ -3356,8 +3355,7 @@ public_fREe(Void_t* mem)
mstate ar_ptr;
mchunkptr p; /* chunk corresponding to mem */
- void (*hook) __MALLOC_P ((__malloc_ptr_t, __const __malloc_ptr_t)) =
- __free_hook;
+ void (*hook) (__malloc_ptr_t, __const __malloc_ptr_t) = __free_hook;
if (hook != NULL) {
(*hook)(mem, RETURN_ADDRESS (0));
return;
@@ -3405,8 +3403,7 @@ public_rEALLOc(Void_t* oldmem, size_t bytes)
Void_t* newp; /* chunk to return */
- __malloc_ptr_t (*hook) __MALLOC_P ((__malloc_ptr_t, size_t,
- __const __malloc_ptr_t)) =
+ __malloc_ptr_t (*hook) (__malloc_ptr_t, size_t, __const __malloc_ptr_t) =
__realloc_hook;
if (hook != NULL)
return (*hook)(oldmem, bytes, RETURN_ADDRESS (0));
diff --git a/malloc/mcheck-init.c b/malloc/mcheck-init.c
index a01d9db..b6354ca 100644
--- a/malloc/mcheck-init.c
+++ b/malloc/mcheck-init.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994, 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994, 1995, 1996, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,9 +23,9 @@
#include <mcheck.h>
static void
-turn_on_mcheck __P ((void))
+turn_on_mcheck (void)
{
mcheck (NULL);
}
-void (*__malloc_initialize_hook) __P ((void)) = turn_on_mcheck;
+void (*__malloc_initialize_hook) (void) = turn_on_mcheck;
diff --git a/malloc/mtrace.c b/malloc/mtrace.c
index c4239dd..3ae9e8d 100644
--- a/malloc/mtrace.c
+++ b/malloc/mtrace.c
@@ -1,5 +1,5 @@
/* More debugging hooks for `malloc'.
- Copyright (C) 1991-1994,1996-2001,2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1991-1994,1996-2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written April 2, 1991 by John Gilmore of Cygnus Support.
Based on mcheck.c by Mike Haertel.
@@ -65,15 +65,13 @@ int _mtrace_line;
#endif
/* Old hook values. */
-static void (*tr_old_free_hook) __P ((__ptr_t ptr, const __ptr_t));
-static __ptr_t (*tr_old_malloc_hook) __P ((__malloc_size_t size,
- const __ptr_t));
-static __ptr_t (*tr_old_realloc_hook) __P ((__ptr_t ptr,
- __malloc_size_t size,
- const __ptr_t));
-static __ptr_t (*tr_old_memalign_hook) __P ((__malloc_size_t __alignment,
- __malloc_size_t __size,
- __const __ptr_t));
+static void (*tr_old_free_hook) (__ptr_t ptr, const __ptr_t);
+static __ptr_t (*tr_old_malloc_hook) (__malloc_size_t size, const __ptr_t);
+static __ptr_t (*tr_old_realloc_hook) (__ptr_t ptr, __malloc_size_t size,
+ const __ptr_t);
+static __ptr_t (*tr_old_memalign_hook) (__malloc_size_t __alignment,
+ __malloc_size_t __size,
+ __const __ptr_t);
/* This function is called when the block being alloc'd, realloc'd, or
freed has an address matching the variable "mallwatch". In a debugger,