about summary refs log tree commit diff
path: root/malloc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-11-13 18:58:01 +0000
committerUlrich Drepper <drepper@redhat.com>2004-11-13 18:58:01 +0000
commitc120d94d58267b1100eb871fcb27a498da129d59 (patch)
tree17562365fc3bbec6e97f2c2cc49268ed53cd8a28 /malloc
parent37fa1953d539cc34c33b48bc66a64f5c01dbc1fd (diff)
downloadglibc-c120d94d58267b1100eb871fcb27a498da129d59.tar.gz
glibc-c120d94d58267b1100eb871fcb27a498da129d59.tar.xz
glibc-c120d94d58267b1100eb871fcb27a498da129d59.zip
Update.
2004-11-13  Jakub Jelinek  <jakub@redhat.com>

	* elf/rtld.c (print_statistics): Avoid segfaults if not all namespaces
	are used.  Fix computation of num_relative_relocations on RELA
	architectures other than IA-64 and Alpha.

2004-11-13  Ulrich Drepper  <drepper@redhat.com>

	* malloc/malloc.c (_int_free): Use munmap_chunk for handling
	mmaped memory.
Diffstat (limited to 'malloc')
-rw-r--r--malloc/malloc.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/malloc/malloc.c b/malloc/malloc.c
index d2112b159a..85a9f45861 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -4370,13 +4370,7 @@ _int_free(mstate av, Void_t* mem)
 
   else {
 #if HAVE_MMAP
-    int ret;
-    INTERNAL_SIZE_T offset = p->prev_size;
-    mp_.n_mmaps--;
-    mp_.mmapped_mem -= (size + offset);
-    ret = munmap((char*)p - offset, size + offset);
-    /* munmap returns non-zero on failure */
-    assert(ret == 0);
+    munmap_chunk (p);
 #endif
   }
 }