aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-01-22 00:12:23 +0000
committerUlrich Drepper <drepper@redhat.com>2001-01-22 00:12:23 +0000
commit608d481e6bf29f1b2aea0268b3130ad026f004ed (patch)
tree19f644b47fe3959e1404d9711d5177aa83b5d59a
parenta5fdf99b7c4d23acbc3d3f77f6c4d4456ff6006f (diff)
downloadglibc-608d481e6bf29f1b2aea0268b3130ad026f004ed.zip
glibc-608d481e6bf29f1b2aea0268b3130ad026f004ed.tar.gz
glibc-608d481e6bf29f1b2aea0268b3130ad026f004ed.tar.bz2
Update.
2001-01-21 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> * sysdeps/unix/sysv/linux/powerpc/mmap64.c: Correctly mask offset. 2001-01-21 Ulrich Drepper <drepper@redhat.com> * malloc/malloc.c: Remove a few unnecessary initializers of global variables.
-rw-r--r--ChangeLog9
-rw-r--r--malloc/malloc.c18
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/mmap64.c2
3 files changed, 19 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 240262f..dc991cf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2001-01-21 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
+
+ * sysdeps/unix/sysv/linux/powerpc/mmap64.c: Correctly mask offset.
+
+2001-01-21 Ulrich Drepper <drepper@redhat.com>
+
+ * malloc/malloc.c: Remove a few unnecessary initializers of global
+ variables.
+
2000-12-09 H.J. Lu <hjl@gnu.org>
* nss/Makefile (routines): Add digits_dots.
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 1ac3b5d..311fd17 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -1,5 +1,5 @@
/* Malloc implementation for multiple threads without lock contention.
- Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
and Doug Lea <dl@cs.oswego.edu>, 1996.
@@ -1538,7 +1538,7 @@ static tsd_key_t arena_key;
static mutex_t list_lock = MUTEX_INITIALIZER;
#if THREAD_STATS
-static int stat_n_heaps = 0;
+static int stat_n_heaps;
#define THREAD_STAT(x) x
#else
#define THREAD_STAT(x) do ; while(0)
@@ -1556,11 +1556,11 @@ static int check_action = DEFAULT_CHECK_ACTION;
static char* sbrk_base = (char*)(-1);
/* The maximum memory obtained from system via sbrk */
-static unsigned long max_sbrked_mem = 0;
+static unsigned long max_sbrked_mem;
/* The maximum via either sbrk or mmap (too difficult to track with threads) */
#ifdef NO_THREADS
-static unsigned long max_total_mem = 0;
+static unsigned long max_total_mem;
#endif
/* The total memory obtained from system via sbrk */
@@ -1568,13 +1568,13 @@ static unsigned long max_total_mem = 0;
/* Tracking mmaps */
-static unsigned int n_mmaps = 0;
-static unsigned int max_n_mmaps = 0;
-static unsigned long mmapped_mem = 0;
-static unsigned long max_mmapped_mem = 0;
+static unsigned int n_mmaps;
+static unsigned int max_n_mmaps;
+static unsigned long mmapped_mem;
+static unsigned long max_mmapped_mem;
/* Mapped memory in non-main arenas (reliable only for NO_THREADS). */
-static unsigned long arena_mem = 0;
+static unsigned long arena_mem;
diff --git a/sysdeps/unix/sysv/linux/powerpc/mmap64.c b/sysdeps/unix/sysv/linux/powerpc/mmap64.c
index 076ceaa..fc0c959 100644
--- a/sysdeps/unix/sysv/linux/powerpc/mmap64.c
+++ b/sysdeps/unix/sysv/linux/powerpc/mmap64.c
@@ -47,7 +47,7 @@ __mmap64 (__ptr_t addr, size_t len, int prot, int flags, int fd, off64_t offset)
# ifndef __ASSUME_MMAP2_SYSCALL
! have_no_mmap2 &&
# endif
- ! (offset & -(1 << (PAGE_SHIFT+1))))
+ ! (offset & ((1 << PAGE_SHIFT)-1)))
{
# ifndef __ASSUME_MMAP2_SYSCALL
int saved_errno = errno;