From: H. Peter Anvin Date: Sun, 7 Jun 2009 22:12:39 +0000 (-0700) Subject: memdisk: move the heap to high memory X-Git-Tag: syslinux-3.83-pre2~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f05ef9550d95c4ea386bd1879e0e03e81fd0a951;p=profile%2Fivi%2Fsyslinux.git memdisk: move the heap to high memory Instead of using a heap arbitrarily allocated in low memory, move it to a chunk of bss in high memory. Signed-off-by: H. Peter Anvin --- diff --git a/memdisk/unzip.c b/memdisk/unzip.c index 9f198a2..c4b56ef 100644 --- a/memdisk/unzip.c +++ b/memdisk/unzip.c @@ -349,12 +349,14 @@ int check_zip(void *indata, uint32_t size, uint32_t * zbytes_p, */ extern void _end; +static char heap[65536]; + void *unzip(void *indata, uint32_t zbytes, uint32_t dbytes, uint32_t orig_crc, void *target) { - /* Set up the heap; it's the 64K after the bounce buffer */ - free_mem_ptr = (ulg) sys_bounce + 0x10000; - free_mem_end_ptr = free_mem_ptr + 0x10000; + /* Set up the heap; it is simply a chunk of bss memory */ + free_mem_ptr = (size_t)heap; + free_mem_end_ptr = (size_t)heap + sizeof heap; /* Set up input buffer */ inbuf = indata;