4 ms·
I'm confused. If you're running low on memory, why wouldn't you just... deallocate stuff?
by fastball 4y ago
I'm confused. If you're running low on memory, why wouldn't you just... deallocate stuff?
- baisq 4y ago
- flohofwoe 4y agoMainly because with 64 MBytes of RAM filled to the brim with game assets you'd very quickly run into memory fragmentation issues. It's easier to just load big chunks of data at pre-defined memory addresses, and once you need to overwrite most of the memory anyway with new data, starting from a clean slate with a reboot is much more straightforward.
- fullstop 4y agoA lot of Linux-based DSP solutions do this. You either purposely tell the kernel that you have less memory than you do at startup, reserving the rest for the DSP, or you load a kernel driver which can allocate contiguous memory. This driver never actually uses the memory, it just scoops it up before anyone else can.