projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
change uid_t, gid_t, and id_t to unsigned types
[musl]
/
src
/
malloc
/
malloc.c
diff --git
a/src/malloc/malloc.c
b/src/malloc/malloc.c
index
88a31ae
..
1a6d149
100644
(file)
--- a/
src/malloc/malloc.c
+++ b/
src/malloc/malloc.c
@@
-196,7
+196,11
@@
static int init_malloc(size_t n)
return 0;
}
return 0;
}
- mal.brk = __brk(0) + 2*SIZE_ALIGN-1 & -SIZE_ALIGN;
+ mal.brk = __brk(0);
+#ifdef SHARED
+ mal.brk = mal.brk + PAGE_SIZE-1 & -PAGE_SIZE;
+#endif
+ mal.brk = mal.brk + 2*SIZE_ALIGN-1 & -SIZE_ALIGN;
c = expand_heap(n);
c = expand_heap(n);