cancel
Showing results for 
Search instead for 
Did you mean: 

dynamic memory allocation of flash memory

lakshmikantha85
Associate II
Posted on February 07, 2011 at 17:01

dynamic memory allocation of flash memory

5 REPLIES 5
Posted on May 17, 2011 at 14:24

You can't ''free'' memory, you'd need to leave a 16-bit tag as 0xFFFF so you could mark it as unused (write it to something else later). To recover flash memory, you have to erase the whole page (1K or 2K depending on part). You can however write incrementally. Once you fill a page or pages, you can erase and perform garbage collection.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ColdWeather
Senior
Posted on May 17, 2011 at 14:24

What about a file system? If you got KEIL, look at FlashFS (

http://www.keil.com/support/man/docs/rlarm/rlarm_fs_flashfs.htm

). Or try some Open Source file system like ChaNFS...

Andrew Neil
Evangelist
Posted on May 17, 2011 at 14:24

''What about a file system?''

 

Yes, it does sound rather like a simple file system!

 

Wouldn't need all the complexities of hierarchical directories - just a single, ''root'' level.

Like early MS-DOS...?
trevor23
Associate III
Posted on May 17, 2011 at 14:24

Simple unless you have to cater for power interruption (or reset) while writing without corrupting the file system

ColdWeather
Senior
Posted on May 17, 2011 at 14:24

Any write operation to any data storage is critical regardless whether done by own code or by verified file system.