summaryrefslogtreecommitdiff
path: root/libc/stdlib/malloc/malloc.c
diff options
context:
space:
mode:
authorMiles Bader <miles@lsi.nec.co.jp>2002-07-30 09:46:24 +0000
committerMiles Bader <miles@lsi.nec.co.jp>2002-07-30 09:46:24 +0000
commit906ffafd8be8f5b17638f8529d6298ee086a5804 (patch)
tree5ed9e52bc12bc216d84e45ed8d77a1ee1ecd7f34 /libc/stdlib/malloc/malloc.c
parent9b14b185b1f7bd09993a3b79902eee2521f89310 (diff)
MALLOC_SET_SIZE now takes the user-address rather than the base-address.
Diffstat (limited to 'libc/stdlib/malloc/malloc.c')
-rw-r--r--libc/stdlib/malloc/malloc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libc/stdlib/malloc/malloc.c b/libc/stdlib/malloc/malloc.c
index caf90ef02..0e0c9ab57 100644
--- a/libc/stdlib/malloc/malloc.c
+++ b/libc/stdlib/malloc/malloc.c
@@ -121,9 +121,8 @@ malloc (size_t size)
if (mem)
/* Record the size of this block. */
{
- MALLOC_SET_SIZE (mem, size);
-
mem = MALLOC_ADDR (mem);
+ MALLOC_SET_SIZE (mem, size);
MALLOC_DEBUG (" malloc: returning 0x%lx (base:0x%lx, total_size:%d)\n",
(long)mem, (long)mem - MALLOC_ALIGNMENT, size);