WonderfulToolchain / wf-issues

Issue tracker for the Wonderful toolchain.
1 stars 0 forks source link

[target/wswan] Implement sbrk() #8

Open asiekierka opened 1 year ago

asiekierka commented 1 year ago

With the new non-contiguous ROM linker (and, eventually, the WonderWitch target's use of SRAM for data storage), it is viable to add limited support for dynamic memory allocation and have it not be entirely useless. sbrk() would be a good first step.

The non-contiguous linker could be adjusted to allocate the heap and stack in separate "gaps" on user request to maximize the benefit of this, for example placing the stack in 0x0040 - 0x0FFF and the heap in 0xC000 - 0xFDFF.