-->
Page 1 of 1

Free Space on ESP8266

PostPosted: Fri Aug 25, 2017 4:49 pm
by BlackCode
Hello,

I was wondering if there is a way to get the free space of the ESP8266 in bytes, so I can calculate the
free storage in percentage.
Something like :
Also is there a way to get the total storage of the ESP8266?
This would be needed to calculate the percantage of free space.

Regards,
BlackCode

Re: Free Space on ESP8266

PostPosted: Fri Aug 25, 2017 7:46 pm
by rudy
Sketch uses 249745 bytes (23%) of program storage space. Maximum is 1044464 bytes.
Global variables use 33968 bytes (41%) of dynamic memory, leaving 47952 bytes for local variables. Maximum is 81920 bytes.


The above is the output message when I compiled with the Arduino framework. I expect the same, or similar, is available on all the other.

Re: Free Space on ESP8266

PostPosted: Sat Aug 26, 2017 6:30 pm
by karamike
I think you can check the remaining RAM (not Flash-RAM) with
Code: Select allESP.getfreeheap()


Keep in mind that this space might not be available in a single chunk, but fragmented into various smaller chunks.