-->
Page 1 of 1

Real Dynamic Memory

PostPosted: Tue Sep 08, 2015 5:38 pm
by somkoder
Hello everyone,

I am mostly new to ESP8266 programming, and I'm being slightly incompetent to find some information regarding the available Dynamic Memory (as Arduino IDE calls it) on each different module. Are they all the same little 81920 bytes only?

As I did not manage yet to find, I just experimented with both ESP01 and ESP12, and in both Arduino IDE says there are only those 81920 bytes, is that correct? I was expecting the ESP12 to offer a bit more RAM...

By the way, the Arduino IDE is working amazingly well in both modules, I'm simply loving it, thank you very much for the great work!

Re: Real Dynamic Memory

PostPosted: Tue Sep 08, 2015 10:27 pm
by martinayotte
First, there is no DRAM here, it is internal SRAM part of the ESP8266EX chip, so since all modules, ESP-01/ESP-03/ESP-07/ESP-12/ESP-12E as well as other flavours using the same chip, the amount of SRAM is the same. The only thing that differ from one flavour to another about memory size is the Flash since the Flash is an external SPI Flash, it can range from 512KB to 16MB, although I didn't see some with 16MB, I've just received some spare chips few days ago, I will probably replace the Flash on some of my modules (I've already done the same with some 4MB).
BTW, if you need more SRAM, but simply for store buffer, not for code/heap/stack, there are some existing SPI RAM too available that you can add externally.

Re: Real Dynamic Memory

PostPosted: Wed Sep 09, 2015 10:21 am
by somkoder
Thank you very much for the clear answer.

The reason for me to ask was because I wrote a simple "packet forwarder" for the ESP8266, it works like a simple/limited router, and I wanted to allocate at least 32k for the packet buffer, but I got only 10k which is sufficient for most applications but not really enough for what I wanted.

On my tests, though, sending/receiving 64 bytes between two connected android devices (with one ESP8266 in the middle acting as the "router"), I got about 10mbps throughput.

Will see if I clean the code today and upload to github for people who might be interested on this.

Re: Real Dynamic Memory

PostPosted: Wed Sep 09, 2015 10:44 am
by somkoder
Ok, I just released the initial version, and opened a new thread about it here: http://www.esp8266.com/viewtopic.php?f=29&t=5462

Thank you very much!