X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fmalloc%2Fmalloc.c;h=1a6d1493291c7ed2d816687d92d100b78c972137;hp=88a31ae4f5b0293d3afb73c931f6d828f9d891c9;hb=b8ccf8e46bab6ee9d63a6e392c3b33b9aa89255c;hpb=3ee67505fe50299d6df6e9bca894fd6b568669fb diff --git a/src/malloc/malloc.c b/src/malloc/malloc.c index 88a31ae4..1a6d1493 100644 --- a/src/malloc/malloc.c +++ b/src/malloc/malloc.c @@ -196,7 +196,11 @@ static int init_malloc(size_t n) 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);