AgonConsole8 / agon-mos

Official AGON QUARK Firmware for Console8: eZ80 MOS
MIT License
25 stars 10 forks source link

umm_malloc library #58

Closed envenomator closed 4 months ago

envenomator commented 5 months ago

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.

envenomator commented 4 months ago

Ok, this PR is fully tested and ready