After gc.collect, mem_free is more than 1Mbytes but cannot allocate 200kb bytearray. #12987
-
Greetings, After using graphic lib(lvgl), load some png etc.. I am so lost, please show me the light :)
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This sort of issue is quite common in longer-running applications, or ones that have a lot of "object churn" - it's memory fragmentation. It's an issue on pretty much all embedded systems of any kind, unless they implement a (dramatically more complicated) dynamic memory manager that can perform deframenting. There were quite a lot of discussions about this on the old forum: https://www.google.com/search?q=micropython+memory+fragmentation+site:forum.micropython.org |
Beta Was this translation helpful? Give feedback.
This sort of issue is quite common in longer-running applications, or ones that have a lot of "object churn" - it's memory fragmentation.
It's an issue on pretty much all embedded systems of any kind, unless they implement a (dramatically more complicated) dynamic memory manager that can perform deframenting.
There were quite a lot of discussions about this on the old forum: https://www.google.com/search?q=micropython+memory+fragmentation+site:forum.micropython.org