Hello,
I am looking for a reference that explains how memory is managed with MicroPython on the ESP8266. I know the basic facts, that my D1 Mini has 4MB of flash and that the ESP8266 has 80KB of RAM. I know that I can check how much heap is available with gc.mem_free(). But I don't really know what factors are at play in terms of files in the flash, objects created, modules imported, etc. when I get out of memory errors. I searched in the forum but couldn't find anything. Does any of you have a link, please?
Thank you!
AP
Memory management primer
Re: Memory management primer
I did a talk at the Melbourne MicroPython Meetup a couple of years ago that covers a bunch of details about the GC with a particular focus on fragmentation and object layout. https://www.youtube.com/watch?v=H_xq8IYjh2wAPinto wrote: ↑Tue Jul 05, 2022 12:33 pmI am looking for a reference that explains how memory is managed with MicroPython on the ESP8266. I know the basic facts, that my D1 Mini has 4MB of flash and that the ESP8266 has 80KB of RAM. I know that I can check how much heap is available with gc.mem_free(). But I don't really know what factors are at play in terms of files in the flash, objects created, modules imported, etc. when I get out of memory errors. I searched in the forum but couldn't find anything. Does any of you have a link, please?
This page from the docs might be helpful too https://docs.micropython.org/en/latest/ ... ained.html
This is a long (five page!) thread from a while ago that also has a lot of details viewtopic.php?f=2&t=7345
But also, feel free to ask questions and we can answer them. I'm actually working on the MicroPython docs this week, so it would be good to get some ideas for things to write about and improve.
Re: Memory management primer
Hello Jimmo, thank you! I'll try to get some questions I have today, and put there here.
AP
AP