Quote:
Originally Posted by apalrd
I've always understood embedded systems (such as FIRST robots) which run in real time iteratively have little need for dynamic memory allocation (as they always use the same variables, and pass data in and out of functions and variable storage).
|
Quote:
Originally Posted by apalrd
In FRC, I use LabVIEW which does everything for me.
|
The short answer is not quite. You cant ever forget memory. Any time you call a function and it has any variable you have allocated more memory you run the risk of trouble. Even with 8GBs of ram a recursive statement just declaring 1.01 run a billion times will run into issues with memory allocation. That sounds insanely unlucky to happen, but if you dont get rid of variables you are using over time you have a left a lot of variables the processor has not optimized out of existence once used.
Even labview you do this. All those close vi's de-allocate all the cache you initialize.