How much memory is available for user application on Electron?

I think this is very important information for most users.
Do you have details about Memory mapping.
Is there more space compared to Photon because most of the memory is allocated for wifi driver?

1 Like

This is an empty app, compiled for a Beta Electron, in the IDE:

1 Like

The Electron Memory Map is very similar to the Photon’s. Currently there is 128KB of memory set aside in Sector 8 for the User Application. There are some other proposals for how memory will be organized in the Electron as well, like user selectable 128KB vs 256KB User Application memory.

I’ll make a note to add this to the Electron Datasheet :wink:

5 Likes

Hi @Moors7, by any chance do you know what the units of measurement are for that?

I’m wondering - I get 94016 as the result when I run:

Serial.println(System.freeMemory());

Which doesn’t seem to align to the ranges here, so I’m assuming it’s a different unit of measurement?

In a nutshell:
Flash used 23024 / 110592 20.8 %
RAM used 2196 / 20480 10.7 %

It is in bytes, but they’re measuring different things. The RAM used in build is the amount of statically allocated RAM allocated by the compiler. The System.freeMemory() is the amount of heap space available for dynamic memory allocation.

This tutorial might explain things:

1 Like

@rickkas7, the problem with the IDE-generated stats is they seem to be for a Core and not for the newer platforms. This has been a issue for a long time now.