Hi all, I only just got my Netduino Plus today and certainly haven't written anything large enough to hit any kind of memory or size limitations yet, but from my experience with software development I had a couple of ideas I was curious if anyone had tried or were even possible.
Outside of .Net Micro, the ARM architecture itself supports virtual memory; would it be possible to set up a page file on the MicroSD for additional memory?
Besides that, I was thinking you could "simulate" paging by serializing objects and storing them to the MicroSD while they're not immediately needed, then when the memory is free or they are needed again, deserializing them back to their original state and continuing your operation on them. I would imagine writing a wrapper or framework to do this semi-transparently wouldn't be too difficult. Doing this in the middle of an operation/function would be extremely slow, but if you needed the additional memory it could be an option. This would be similar to lazy-loading data from a database done in NHibernate and Entity Framework.
.Net Micro kind of supports native/unsafe code, and while I've never done this (and it may not even be possible) there's a practice of self-modifying code in entirely native languages. I presume you can't store executable code to the MicroSD but it seems like, similar to above you could load code from the MicroSD and overwrite a portion of memory from it. Of course, because of the CLR I doubt you'd be able to reliably rewrite portions of memory to change the execution path.
Overall, what methods (especially clever ones) have people taken to squeeze the most out of their storage and memory for their executable code? (Aside from buying a board with more of both )
Some ideas for memory management
Started by Chris S, Mar 08 2012 07:33 AM
2 replies to this topic
#1
Posted 08 March 2012 - 07:33 AM
#2
Posted 08 March 2012 - 08:07 AM
Here's a thread discussing efficient memory usage on the Netduino. Not very hands-on but still:
http://forums.netdui...t-memory-usage/
http://forums.netdui...t-memory-usage/
#3
Posted 08 March 2012 - 08:33 AM
Hi cmdrshepardspie,
Community member Fabien Royer put together a really cool project using a display...and cached data on an SD card. He wrote and rewrote to it continuously, acting as extended short-term storage (RAM-like) and it ran for many months.
Chris
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users