Clearing RAM

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Clearing RAM

Post by jimmo » Mon Feb 08, 2021 6:15 am

Minyiky wrote:
Sun Feb 07, 2021 3:08 pm
memory error saying it is unable to allocate 2048bytes.
The main thing with fragmentation is to avoid constantly freeing and re-allocating the same objects. In your case, if you're calling draw_image frequently, then it might be a good idea to make the buffer permanent (i.e. allocate once on startup).

Post Reply