Main Site Documentation

Fez Domino - memory allocation


#1

Hello,

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

Thanks


#2

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


#3

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: http://www.tinyclr.com/forum/2/4627/#/1/msg43733, subtract the ROM number from 181000 (approx). So in my case I have approx 37kB left.