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

legato fixed heap memory management problems #27

Open
simeonfelis opened this issue Oct 17, 2022 · 3 comments
Open

legato fixed heap memory management problems #27

simeonfelis opened this issue Oct 17, 2022 · 3 comments

Comments

@simeonfelis
Copy link

When switching screens multiple times I run into an assert while in leFixedHeap_Alloc. The error message that follows is:

Fixed heap 128 is full.

Here is an example app that changes the screen every second using legato_showScreen(). According to the generated code, all legato widgets/elements should be destroyed and the assigned memory should be freed when switching screen. It seems this is not the case. After 17 switches the described assert is triggered.

Using gfx v3.11.1

@MHGC
Copy link
Contributor

MHGC commented Oct 17, 2022

Thank you for reporting. We will investigate this.

@mhtmhn
Copy link

mhtmhn commented Nov 3, 2022

In the file legato_widget.c, change lines L148-L150 from this:

    for(i = 0; i < _this->children.size; i++)
    {
        child = _this->children.values[i];

to this:

    while(_this->children.size > 0)
    {
        child = _this->children.values[0];

@MHGC
Copy link
Contributor

MHGC commented Nov 3, 2022

This fix will be applied to the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants