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

bug in SDRAM defrag #864

Closed
mrubioroy opened this issue Apr 12, 2024 · 1 comment · Fixed by #871
Closed

bug in SDRAM defrag #864

mrubioroy opened this issue Apr 12, 2024 · 1 comment · Fixed by #871
Assignees

Comments

@mrubioroy
Copy link

function defrag_free_list in libraries/ea_malloc/malloc_freelist.c contains a bug miscalculating the new block size.

After a few malloc/free operations it hangs.

line 70 should be lb->size += ALLOC_HEADER_SZ + b->size; (i.e.: replace sizeof(*b) by ALLOC_HEADER_SZ).

This bug has already been solved in the current upstream version:
libmemory/src/malloc_freelist.c

@iabdalkader
Copy link
Contributor

iabdalkader commented Apr 18, 2024

Can you post a sketch to reproduce the issue ?

Never mind, I do see the issue.

@iabdalkader iabdalkader self-assigned this Apr 18, 2024
iabdalkader added a commit to iabdalkader/ArduinoCore-mbed that referenced this issue Apr 18, 2024
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 a pull request may close this issue.

2 participants