From 7d602faf7652cbd8358ff90a9eaa53ac5230dabe Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Tue, 28 Oct 2008 06:48:06 +0000 Subject: Finally fix the MALLOC=y and MALLOC_SIMPLE=y breakage from svn 23660. (I found it, this is Bernhard's patch to fix it. Tested and it Works For Me (tm)). --- libc/stdlib/malloc/heap_alloc_at.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libc/stdlib/malloc/heap_alloc_at.c') diff --git a/libc/stdlib/malloc/heap_alloc_at.c b/libc/stdlib/malloc/heap_alloc_at.c index 4c071b9ef..45d68598a 100644 --- a/libc/stdlib/malloc/heap_alloc_at.c +++ b/libc/stdlib/malloc/heap_alloc_at.c @@ -19,17 +19,17 @@ /* Allocate SIZE bytes at address MEM in HEAP. Return the actual size allocated, or 0 if we failed. */ size_t -__heap_alloc_at (struct heap_free_area *heap, void *mem, size_t size) +__heap_alloc_at (struct heap_free_area **heap, void *mem, size_t size) { struct heap_free_area *fa; size_t alloced = 0; size = HEAP_ADJUST_SIZE (size); - HEAP_DEBUG (heap, "before __heap_alloc_at"); + HEAP_DEBUG (*heap, "before __heap_alloc_at"); /* Look for a free area that can contain SIZE bytes. */ - for (fa = heap; fa; fa = fa->next) + for (fa = *heap; fa; fa = fa->next) { void *fa_mem = HEAP_FREE_AREA_START (fa); if (fa_mem <= mem) @@ -41,7 +41,7 @@ __heap_alloc_at (struct heap_free_area *heap, void *mem, size_t size) } } - HEAP_DEBUG (heap, "after __heap_alloc_at"); + HEAP_DEBUG (*heap, "after __heap_alloc_at"); return alloced; } -- cgit v1.2.3