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>
*/
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;