Skip to content

ea_malloc: Fix defrag_free_list block size bug. #871

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

Merged
merged 1 commit into from
Apr 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions libraries/ea_malloc/malloc_freelist.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

/*
* This is the container for our free-list.
* Node the usage of the linked list here: the library uses offsetof
* Note the usage of the linked list here: the library uses offsetof
* and container_of to manage the list and get back to the parent struct.
*/
typedef struct
Expand Down Expand Up @@ -67,7 +67,7 @@ void defrag_free_list(void)
{
if((((uintptr_t)&lb->block) + lb->size) == (uintptr_t)b)
{
lb->size += sizeof(*b) + b->size;
lb->size += ALLOC_HEADER_SZ + b->size;
list_del(&b->node);
continue;
}
Expand Down
Loading