Main Site Documentation

RAM usage


#1

Sorry for the long post, but…

I’ve written a music player based on the excellent RLP driver from @ godFather89 at this link: https://www.dropbox.com/s/j4u1ehy0m1d3iot/MyMP3v7_src.zip

I ported @ godFather89’s RLP code to the Panda II and Music Shield. It works great, but I haven’t been able to implement all the features (plugin loading, and network streaming) because I’m running out of RAM. The application uses about 6-7K bytes for buffers, and that number is confirmed using Debug.GC(false).

At program startup, before any buffers are allocated, GC reports that about 26K bytes are used, and 27K bytes are available. After buffer allocation GC reports about 20K is available.

During deployment I get these RAM sizes reported for each assembly:

Assembly: mscorlib (4.1.2821.0) (3880 RAM - 33236 ROM - 19134 METADATA)
Assembly: System.IO (4.1.2821.0) (1548 RAM - 13292 ROM - 5862 METADATA)
Assembly: System (4.1.2821.0) (872 RAM - 5992 ROM - 3206 METADATA)
Assembly: GHIElectronics.NETMF.System (4.1.8.0) (488 RAM - 2496 ROM - 1465 METADATA)
Assembly: Microsoft.SPOT.IO (4.1.2821.0) (740 RAM - 4620 ROM - 2522 METADATA)
Assembly: JDI.NETMF.Shields.Music (1.0.0.0) (1116 RAM - 14404 ROM - 3819 METADATA)
Assembly: Microsoft.SPOT.Net (4.1.2821.0) (704 RAM - 5060 ROM - 2452 METADATA)
Assembly: JDI.MusicPlayer (1.0.0.0) (428 RAM - 2728 ROM - 881 METADATA)
Assembly: GHIElectronics.NETMF.IO (4.1.8.0) (212 RAM - 664 ROM - 289 METADATA)
Assembly: GHIElectronics.NETMF.Native (4.1.8.0) (476 RAM - 4020 ROM - 1659 METADATA)
Assembly: Microsoft.SPOT.Native (4.1.2821.0) (1144 RAM - 6516 ROM - 4479 METADATA)
Assembly: Microsoft.SPOT.Hardware (4.1.2821.0) (1752 RAM - 11440 ROM - 7371 METADATA)

These total up to 13360 bytes, but the final total reported by VS is:

Total: (11608 RAM - 104468 ROM - 53139 METADATA)

And neither of these numbers account for the 26K bytes reported by GC on program start.

Please help me understand these numbers! Thanks!

Anyone!!


#2

Ok, let me try again…

Is there any documentation on what these numbers mean or how they are calculated?

Total: (11608 RAM - 104468 ROM - 53139 METADATA)

Thanks.


#3

Not that I know of. But that knowledge is in the Porting Kit source code.


#4

@ Architect - Thank you. I’ll look through that tonight.