diff options
author | H. Peter Anvin <hpa@zytor.com> | 2009-06-07 15:12:39 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-06-07 15:12:39 -0700 |
commit | f05ef9550d95c4ea386bd1879e0e03e81fd0a951 (patch) | |
tree | 30f0448ba9152919850e72e62dd2be7b761866bc /memdisk | |
parent | f6665369b2ccf30bbb334b7ff20ebaac07c10a3e (diff) | |
download | syslinux-f05ef9550d95c4ea386bd1879e0e03e81fd0a951.tar.gz |
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 <hpa@zytor.com>
Diffstat (limited to 'memdisk')
-rw-r--r-- | memdisk/unzip.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/memdisk/unzip.c b/memdisk/unzip.c index 9f198a20..c4b56efb 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; |