Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Some ideas for memory management


  • Please log in to reply
2 replies to this topic

#1 Chris S

Chris S

    Member

  • Members
  • PipPip
  • 20 posts
  • LocationBroomfield, CO

Posted 08 March 2012 - 07:33 AM

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 :P)

#2 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

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/

#3 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

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

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.