Remix.run Logo
omoikane 10 hours ago

> Might as well go back to ye olden days and put 100% of your memory in a giant preallocated block

I do that for the Playdate: statically allocate most of the large structures and tables in global variables, and don't call malloc or free after initialization is done.

I also put some things on the stack, not so much because I need to dynamically allocate or free something, often it's because I get lower access latency to the stack compared to main memory (because stack lives inside ARM's tightly coupled memory).