Fez Domino - memory allocation

Hello,

Is it possible to know how much free program memory anda data memory is available after loading the application ?

Thanks

Debug.GC method returns amount of free (unused) memory, in bytes.

And for program (flash) memory, note the report in the output window of Visual Studio when the app is deployed, a little up from the end you’ll see a line like:

Total: (15792 RAM - 143940 ROM - 69639 METADATA)

You can also get the same report in MFDEPLOY by connecting to the board and pressing the reset button.

The RAM figure is just static stuff allocated by the compiler, not the maximum your application needs when running - Architect’s method will tell you that. I put Debug.GC in an interrupt handler for a push button so I can get a report at any time.

For ROM, according to Gus on this thread: [url]http://www.tinyclr.com/forum/2/4627/#/1/msg43733[/url], subtract the ROM number from 181000 (approx). So in my case I have approx 37kB left.