Skip to content
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

fix(stdlib): fix issues when using LVGL TLSF memory pool to manage more than 4 GiB of memory #5720

Merged
merged 1 commit into from Feb 24, 2024

Conversation

MouriNaruto
Copy link
Contributor

@MouriNaruto MouriNaruto commented Feb 22, 2024

Description of the feature or fix

People will know that I'm developing UEFI applications with LVGL in recent days after read #5391 (comment).

Because UEFI memory pool will cause many memory fragments. So, my project uses LVGL builtin TLSF memory pool to manage the memory. And I found if I use LVGL TLSF memory pool to manage more than 4 GiB of memory, I cannot get the correct result via lv_mem_monitor API.

I also found the original LVGL implementation have considered about the 64-bit environments and many lv_mem APIs use size_t to manage size. So, I think it should not break the ABI for 32-bit environments if we use size_t type instead of uint32_t type to fix the issue. (For 64-bit LVGL users needs to recompile. But I think most people don't use 64-bit LVGL instance in the current stage. It should be acceptable.)

Notes

Kenji Mouri

@MouriNaruto
Copy link
Contributor Author

I think there are some issues should be also fixed for LVGL. (Need some time to do.)

Kenji Mouri

@MouriNaruto
Copy link
Contributor Author

It looks like all CIs are passed. It should be continued.

Kenji Mouri

XuNeo
XuNeo previously approved these changes Feb 22, 2024
@MouriNaruto
Copy link
Contributor Author

MouriNaruto commented Feb 22, 2024

image
Here is the screenshot of just using LVGL TLSF memory pool with this fix to manage 6 GiB of memory in my test virtual machine.

Kenji Mouri

src/stdlib/lv_mem.c Outdated Show resolved Hide resolved
src/stdlib/lv_mem.c Outdated Show resolved Hide resolved
Copy link
Member

@kisvegabor kisvegabor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you!

@FASTSHIFT FASTSHIFT merged commit 10f9d98 into lvgl:master Feb 24, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants