* malloc/hooks.c [! HAVE_MREMAP]: Conditionalize unused decls.

* malloc/malloc.c [! HAVE_MREMAP]: Likewise.
This commit is contained in:
Roland McGrath 2002-02-07 05:30:48 +00:00
parent 48a5e01019
commit a9177ff526
3 changed files with 222 additions and 217 deletions

View File

@ -1,5 +1,8 @@
2002-02-06 Roland McGrath <roland@frob.com>
* malloc/hooks.c [! HAVE_MREMAP]: Conditionalize unused decls.
* malloc/malloc.c [! HAVE_MREMAP]: Likewise.
* scripts/versions.awk: Improve error message for missing version.
Each version inherits from the last one only if they have the same
nonnumeric prefix, i.e. GLIBC_x.y and GLIBC_x.z or FOO_x and FOO_y

View File

@ -1,5 +1,5 @@
/* Malloc implementation for multiple threads without lock contention.
Copyright (C) 2001 Free Software Foundation, Inc.
Copyright (C) 2001,02 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Wolfram Gloger <wg@malloc.de>, 2001.
@ -322,7 +322,7 @@ realloc_check(oldmem, bytes, caller)
Void_t* oldmem; size_t bytes; const Void_t *caller;
#endif
{
mchunkptr oldp, newp = 0;
mchunkptr oldp;
INTERNAL_SIZE_T nb, oldsize;
Void_t* newmem = 0;
@ -345,7 +345,7 @@ realloc_check(oldmem, bytes, caller)
#if HAVE_MMAP
if (chunk_is_mmapped(oldp)) {
#if HAVE_MREMAP
newp = mremap_chunk(oldp, nb);
mchunkptr newp = mremap_chunk(oldp, nb);
if(!newp) {
#endif
/* Note the extra SIZE_SZ overhead. */

View File

@ -1,5 +1,5 @@
/* Malloc implementation for multiple threads without lock contention.
Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
Copyright (C) 1996,1997,1998,1999,2000,01,02 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Wolfram Gloger <wg@malloc.de>
and Doug Lea <dl@cs.oswego.edu>, 2001.
@ -1444,7 +1444,9 @@ static struct mallinfo mALLINFo(mstate);
static Void_t* internal_function mem2mem_check(Void_t *p, size_t sz);
static int internal_function top_check(void);
static void internal_function munmap_chunk(mchunkptr p);
#if HAVE_MREMAP
static mchunkptr internal_function mremap_chunk(mchunkptr p, size_t new_size);
#endif
static Void_t* malloc_check(size_t sz, const Void_t *caller);
static void free_check(Void_t* mem, const Void_t *caller);