diff options
author | Peter Wemm <peter@FreeBSD.org> | 2000-05-12 22:43:20 +0000 |
---|---|---|
committer | Peter Wemm <peter@FreeBSD.org> | 2000-05-12 22:43:20 +0000 |
commit | c536ef83f046d5d4b6b2d56ab3cc997ff7cc6208 (patch) | |
tree | 57e903592a2bb543fa7605f27d85c69d269f6b44 | |
parent | 4887dfcfd4042371414cd5368f286808fb98f30c (diff) |
Notes
-rw-r--r-- | lib/libstand/sbrk.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libstand/sbrk.c b/lib/libstand/sbrk.c index fce03cf2a29f..326311130c4f 100644 --- a/lib/libstand/sbrk.c +++ b/lib/libstand/sbrk.c @@ -39,8 +39,9 @@ static void *heapbase; void setheap(void *base, void *top) { - heapbase = base; - maxheap = top - base; + /* Align start address to 16 bytes for the malloc code. Sigh. */ + heapbase = (void *)(((uintptr_t)base + 15) & ~15); + maxheap = top - heapbase; } char * |