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
Found Assembly Microsoft.SPOT.Native
Found Assembly Microsoft.SPOT.Hardware
Found Assembly Microsoft.SPOT.Graphics
Found Assembly Microsoft.SPOT.TinyCore
Found Assembly Microsoft.SPOT.Hardware.SerialPort
Found Assembly Microsoft.SPOT.IO
Found Assembly System.IO
Found Assembly Microsoft.SPOT.Hardware.OneWire
Found Assembly Microsoft.SPOT.Hardware.Usb
Found Assembly System.Xml
Found Assembly Microsoft.SPOT.Hardware.PWM
Found Assembly Microsoft.SPOT.Net
Found Assembly System
Found Assembly GHI.OSHW.Hardware
Found Assembly Gadgeteer
Found Assembly System.Http
Found Assembly Microsoft.SPOT.Net.Security
Found Assembly System.Net.Security
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…