summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libc/stdlib/malloc/malloc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libc/stdlib/malloc/malloc.c b/libc/stdlib/malloc/malloc.c
index b2fb6677b..4a0cf0ba5 100644
--- a/libc/stdlib/malloc/malloc.c
+++ b/libc/stdlib/malloc/malloc.c
@@ -121,10 +121,9 @@ malloc (size_t size)
__malloc_unlock ();
if (__malloc_likely (mem))
- /* Record the size of this block. */
+ /* Record the size of the block and get the user address. */
{
- mem = MALLOC_ADDR (mem);
- MALLOC_SET_SIZE (mem, size);
+ mem = MALLOC_SETUP (mem, size);
MALLOC_DEBUG (" malloc: returning 0x%lx (base:0x%lx, total_size:%d)\n",
(long)mem, (long)MALLOC_BASE(mem), (long)MALLOC_SIZE(mem));