- Tue Feb 02, 2016 11:44 am
#40277
Sorry, no. The web pages are just being stored as character constants in "normal" memory (whatever that would be). EEPROM is being used for user data like password, IP settings. It was running great with that. Then I added a list of 20 new Strings to EEPROM, each 32 bytes, and that's when things turned unusable.
I'd post my code but it's around 1400 lines right now (probably half being html) and I don't think it makes good bathroom reading, if you know what I mean.
Compiling the current code reports "Sketch uses 271,778 bytes (26%) of program storage space. Maximum is 1,044,464 bytes.
Global variables use 51,748 bytes (63%) of dynamic memory, leaving 30,172 bytes for local variables. Maximum is 81,920 bytes."
Heap is around 20,000 at boot, but serving just one mostly static page fails and if I can catch the heap before it panics it will be around 5000. Maybe it's not really a heap problem, but that's just a symptom of a greater issue?
I'm hoping that there might be some "best practices" type advise for managing memory. For example, use XX for this sort of thing and use YY for this other sort of thing. What the heck PROGMEM is good for. Newbie mistakes... stuff like that? I've never programmed anything as low level as this before, my experience is in web languages like PHP, easy stuff.
Thanks.