-->
Page 1 of 2

out of memory running httpServer to control WS2812

PostPosted: Thu Apr 23, 2015 4:24 am
by jumjum123
I created a small set of modules to control a WS2812 matrix using a httpServer.
Source is available on github
Even having only a small set of functions, I'm running out of memory very soon.

Is there a guideline to save memory ?
Is there any help to control memory consumption ?
In my example, heap is less than 4k, and collectgarbage("count") is 15.
After 2nd request to httpServer it runs out of memory.
Had to remove function for httpClient to get it running.

Re: out of memory running httpServer to control WS2812

PostPosted: Thu Apr 23, 2015 5:10 am
by cal
Moin,

there are some suggestions scattered in various posts from TerryE and others.
It would be great if you can consolidate them and start a wiki page to document them.

I guess if we have some bullet points on that page enhancements will pop up.

Carsten

Re: out of memory running httpServer to control WS2812

PostPosted: Thu Apr 23, 2015 12:06 pm
by TerryE
Carsten,

I am building up a FAQ on this to explain what we've been learning -- in terms that a newbie to ESP 8266 can get a handle on. However, to be honest, I am still learning some of the wrinkles my self! However, I have now got the overhead for my RPC framework down to ~5Kbytes RAM. What I'll do in the next day or so is to put this in github and do this FAQ documentation the github wiki pages. If you / admin think it would be worthwhile then maybe we can upload this FAQ to the esp8266 wiki.

Re: out of memory running httpServer to control WS2812

PostPosted: Thu Apr 23, 2015 1:26 pm
by cal
Cool!

Sounds great!

Carsten