3 ms·
You will also never have a memory safety issue on that processor because in that environment using malloc() is already considered a sin of the highest degree.
by phkahler 10y ago
You will also never have a memory safety issue on that processor because in that environment using malloc() is already considered a sin of the highest degree.
I wrote a chess program that ran on a PIC 16 series with 176 bytes of RAM and I got 5 levels of look-ahead with a compiler that didn't support recursion. No dynamic allocation anywhere.
I laugh when people claim a Raspberry Pi 3 is an "embedded system". Sure you can embed it in something, but it's got an ocean of resources compared to most.
- pdelbarba 10y agoKeep in mind that there's a middle ground here though. ARM 32bit micros still have basically no support from Rust et al but often have enough resources (Cortex M7 anyone?) to do things where it would be nice to have memory safe dynamic allocation. Programmers often have to resort to convoluted static data structures for some tasks where dynamic allocation would be useful and don't get me started on the NXP LPC-like chips that have two cores with shared regions.
- hsivonen 10y agoHow do you mean 32-bit ARM doesn’t have Rust support? See e.g. https://mobile.twitter.com/japaricious/status/845697935572656128 https://mobile.twitter.com/japaricious/status/84569793557265... “Cortex-M3 micro (no FPU) @ 8MHz”
- pdelbarba 10y agoCurrently the only way to use it is via zinc which only supports a few chips and the thumb eabi which is currently in "tier 3" support with no provided binaries or assurances of stability. Basically, there are experimental ways to get it to work, but it's a huge ways away from being useful in a production environment. https://github.com/hackndev/zinc https://github.com/hackndev/zinc https://forge.rust-lang.org/platform-support.html https://forge.rust-lang.org/platform-support.html