aboutsummaryrefslogtreecommitdiff
path: root/malloc/malloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'malloc/malloc.c')
-rw-r--r--malloc/malloc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/malloc/malloc.c b/malloc/malloc.c
index d8fd8b4..41fd76a 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -2749,6 +2749,9 @@ systrim (size_t pad, mstate av)
/* Release in pagesize units, keeping at least one page */
extra = (top_area - pad) & ~(pagesz - 1);
+ if (extra == 0)
+ return 0;
+
/*
Only proceed if end of memory is where we last set it.
This avoids problems if there were foreign sbrk calls.