I've ported the microcontroller-optimized, small umm_malloc library to ZDSII and included it's startup to __heapbot with a size of 8KB. I've already lowered the MOS area to B8000, so next up would need to be the check for 32KB maximum size of any loadable MOSLET.
This PR includes the library, it's startup and all replaced malloc/free calls to umm_malloc/umm_free in different parts of the code and also the setting of all RAM to FFh at MOS startup.
It's important that we no longer use the ZDS-supplied malloc/free calls in future, as they would overlap/collide with this new library. Unfortunately there is no way to prohibit just a single call from stdlib, nor is there an option to override the function with C. We need to be careful not using it in future.
I've ported the microcontroller-optimized, small umm_malloc library to ZDSII and included it's startup to __heapbot with a size of 8KB. I've already lowered the MOS area to B8000, so next up would need to be the check for 32KB maximum size of any loadable MOSLET. This PR includes the library, it's startup and all replaced malloc/free calls to umm_malloc/umm_free in different parts of the code and also the setting of all RAM to FFh at MOS startup.
It's important that we no longer use the ZDS-supplied malloc/free calls in future, as they would overlap/collide with this new library. Unfortunately there is no way to prohibit just a single call from stdlib, nor is there an option to override the function with C. We need to be careful not using it in future.