summaryrefslogtreecommitdiff
path: root/malloc/malloc.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-10-03 19:32:28 +0000
committerJakub Jelinek <jakub@redhat.com>2007-10-03 19:32:28 +0000
commit75cb5a0d471729d28a59b693441e2d527c9e962e (patch)
treeabac9733c1b6c0a7a9c760b7cfe2d21c672e9e90 /malloc/malloc.c
parent441097af93882803bbb3296dd1fdbdd4a7773deb (diff)
Updated to fedora-glibc-20071003T1908cvs/fedora-glibc-2_6_90-17
Diffstat (limited to 'malloc/malloc.c')
-rw-r--r--malloc/malloc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 0755fd8f8d..39d5b3fa52 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -3503,6 +3503,10 @@ mremap_chunk(p, new_size) mchunkptr p; size_t new_size;
/* Note the extra SIZE_SZ overhead as in mmap_chunk(). */
new_size = (new_size + offset + SIZE_SZ + page_mask) & ~page_mask;
+ /* No need to remap if the number of pages does not change. */
+ if (size + offset == new_size)
+ return p;
+
cp = (char *)mremap((char *)p - offset, size + offset, new_size,
MREMAP_MAYMOVE);