Memory probleme

Hello everyone,
I’m design a GUI using LGVL. I got a problem relate to memory as shown in the following picture. I wonder are there any function that I can use to handle this.

I’m looking forward to see the reply as soon as possible.
Best regards,

U should be increase your memory size in lv_config.h
#define LV_MEM_SIZE (32U * 1024U)

tks for your reply. But my memry is quite poor. So any Idea to avoid this error??

if you use low memory MCU, i think u should be clean memory via lv_obj_clean() or lv_obj_del

I didn’t see the detail of those 2 functions. Do they free the memory of the obj that we create??? I just want to sure about the memory because it quite important

When your memory is very poor,then you should cut some features.
For me ,I delete the objects that not being shown to save memory then create them when needed.
The objs be deleted should be handled carefully,I made them point to NULL.
What objects you created? And how many memories you got?

This is the detail of my device. Is that poor??? I create menu. So i create a container to contain the basic screen and then when I click the menu button I clean the container by using lv_obj_clean() function. and then I recreate that container. That’s what I did. I wonder what I did is memory - wasted or not???
*2 Mbytes of Flash memory, 256 Kbytes of RAM

How many ram you give lvgl?
you can use the function to monitor the ram usage:

Maybe you are not releasing the ram in right way.

  1. how can I know how much RAM I give for LVGL?
  2. Can you give me the right way to release the RAM???

You can give it all the left ram,then monitor the usage ,decrease it by the monitor result to a reasonable value.
You should let us know your lcd resolution,your lcd driver.

Some code could be useful

I use ST7565 and my display resolution is 128*64. It’s just a monochrome display.

have you tried this?
The mcu resource is enogh for the display.

I let this number is (64U*1024U)

yes, i used STM32F407VGT6 with 1MB flash, 192kb ram, using for SS1963 with 480x272 lcd display

you have good mcu resource, Can you share your code? mabe you called objects many times thought you just need to call it once

The code quite long . So I think It’s quite difficult to upload it. But you may right, I clean the object and create it many times so that it creates my error. But any ideas to resolve this. I know it sounds strange but logically when I change the screen I have already clean the children of it and redraw the screen. So it’s can’t be out of memory at all @@