Understanding memory on CerbuinoBee

When my application starts, the first line I call is to check available memory.

Debug.Print("Start App Free mem : " + Debug.GC(false).ToString());

I am seeing about 55k free, but was expecting more. If I understand right, that means that over half or RAM is already being used.

I am trying to understand where I am using memory. :slight_smile:

When deploying my assemblies, it states the total size is 114892. When deploying, I see the following in the output window. Does this mean all of these assemblies are being loaded? I have removed references to SPOT.Graphics, SPOT.TinyCore, System.XML and a few others so I am not sure why they are listed here.

I just wan to make sure these are not being loaded.

Looking for a device on transport ‘USB’
Starting device deployment…
Iteration 0
Opening port \?\USB#VID_1B9F&PID_0102#6&7947e71&0&4#{09343630-a794-10ef-334f-82ea332c49f3}\Operations
Attaching debugger engine…
… debugger engine attached!
Querying device assemblies…
Found Assembly mscorlib 4.2.0.0
Found Assembly Microsoft.SPOT.Native 4.2.0.0
Found Assembly Microsoft.SPOT.Hardware 4.2.0.0
Found Assembly Microsoft.SPOT.Graphics 4.2.0.0
Found Assembly Microsoft.SPOT.TinyCore 4.2.0.0
Found Assembly Microsoft.SPOT.Hardware.SerialPort 4.2.0.0
Found Assembly Microsoft.SPOT.IO 4.2.0.0
Found Assembly System.IO 4.2.0.0
Found Assembly Microsoft.SPOT.Hardware.OneWire 4.2.0.0
Found Assembly Microsoft.SPOT.Hardware.Usb 4.2.0.0
Found Assembly System.Xml 4.2.0.0
Found Assembly Microsoft.SPOT.Hardware.PWM 4.2.0.1
Found Assembly Microsoft.SPOT.Net 4.2.0.0
Found Assembly System 4.2.0.0
Found Assembly GHI.OSHW.Hardware 4.2.5.0
Found Assembly Gadgeteer 2.42.0.0
Found Assembly System.Http 4.2.0.0
Found Assembly Microsoft.SPOT.Net.Security 4.2.0.0
Found Assembly System.Net.Security 4.2.0.0
Adding pe file C:\Program Files (x86)\GHI Electronics\GHI OSHW NETMF v4.2 SDK\Assemblies\le\ghi.oshw.hardware.pe to deployment bundle
Adding pe file C:\Program Files (x86)\Microsoft .NET Gadgeteer\Core\Assemblies.NET Micro Framework 4.2\le\gadgeteer.pe to deployment bundle
Adding pe file C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\System.Http.pe to deployment bundle
Adding pe file D:\Users\Mikepat\Documents\Visual Studio 2010\Projects\DMXControllerBee\FEZConnect WebServer\bin\Debug\le\DMXShowContorller.pe to deployment bundle
Adding pe file C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Net.Security.pe to deployment bundle
Adding pe file C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\System.Net.Security.pe to deployment bundle
Attempting deployment…
Incrementally deploying assemblies to device
Deploying assemblies for a total size of 114892 bytes
Assemblies successfully deployed to device.
Restarting interpreter…
Attaching to device…
Waiting for device to initialize…

Gadgeteer eats a lot of ram.

It also includes assemblies that are not required. Looks like this will be fixed in the next release.

What you can do is to remove Microsoft.SPOT.Graphics.

But you do use a lot of assemblies and all of them use ram for buffers etc.

If you create a blank netmf project then you will see how much ram is really available…