-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
memory allocation failed #2
Comments
You probably have to increase |
I change it as (64U * 1024U),still the same. however, I change it as 128U * 1024U , I would goes to compile error. |
lodepng uses normal |
so, are you meaning the problem is because the esp32 having not enough money ? |
I don't know how much money ESP has but it might be out of memory. 🙂 : The resolution of the PNG matters. During decoding the PNG image a |
esp32 having 320K memory. |
What is the resolution of the image? |
320*480 |
It means the decompressed image is 3202402 = 300kB. If it uses 32-bit color format internally (I'm not sure now) than its 600 kB. Anyway, 320kB is not enough in either case. |
but why if I use the normal way(make the png as c-array first), and do not use lodepng, even 100kb png file is works ? |
The PNG doesn't need to be decoded into RAM first with that method. It can be drawn directly from flash to the display. |
I also encountered the problem under lvgl 8.3. But I found two ways to solve it
waiting for the real solution 😄 |
You can increase |
Yes I tried, but it still reports an error。
So I personally think it's possible that lvgl's heap management may not be able to allocate large chunks of memory due to memory fragmentation in some cases
|
apologize to you. it's my mistake. I just committed git and found that the changelog had a change that I had debugged. |
hello,
I'm using esp32 + lvgl + lv_lib_lodepng,
but when I use a png more 20K , it would shows "memory allocation failed", where can I change for making the memory allocation bigger ?
The text was updated successfully, but these errors were encountered: