Memory and assembly loading

Hi there,

I am running a Panda II and currently I’m playing with dynamic Assembly loading. My problem is that I sometimes get a OutOfMemoryException even if I have enough free memory left.

So I’m wondering how dynamic assembly loading works on Panda II.
I mean when I load a pe file which is 25596 bytes I have the following output:

(2232 RAM - 25596 ROM - 8895 METADATA)

Does it mean that my assembly uses 2.2k of RAM (out of the 62k available) and 25.5K of flash/ROM or 25.5k of ram directely ?
So this makes me wonder, assemblies loaded dynamicaly goes in RAM, ROM/Flash ? And assemblies loaded beacause they are referenced in the project, do they go in RAM or in ROM/Flash ?

I’m sorry if the question has already been asked, I couldn’t find a definitive answer…

Thanks,

try doing a Debug.GC(true) before loafing.

Oh don’t worry I did.
The thing is I don’t understand that : (2232 RAM - 25596 ROM - 8895 METADATA)

My wife always makes me do some GC before loafing as well… :smiley:

@ @ $)$&$& auto spel correction

Why mike? Loafing is good :slight_smile:

So what about memory usage in assembly loading ?

[quote]Does it mean that my assembly uses 2.2k of RAM (out of the 62k available) and 25.5K of flash/ROM or 25.5k of ram directely ?
So this makes me wonder, assemblies loaded dynamicaly goes in RAM, ROM/Flash ? And assemblies loaded beacause they are referenced in the project, do they go in RAM or in ROM/Flash ?[/quote]

I do not think there is a clear explanation on what these numbers are anywhere, so any answer you get would be a guess! Maybe try www.netmf.com to see if Microsoft is willing to officially document this for all of us.

Ok thanks, I’ll try netmf.com some other day.

I’d also love an official explanation. I’ve determined how most of it works through trial and error but it is much better to get it from the source.

I’ll be doing some dynamic loading from SD card soon because I have to (my app is now too big for flash), so I’ll document what I learn in the process on my blog again.