Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit54326dd

Browse files
authored
Merge pull request#871 from iabdalkader/ea_malloc_bug
ea_malloc: Fix `defrag_free_list` block size bug.
2 parents5626633 +5ca5520 commit54326dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎libraries/ea_malloc/malloc_freelist.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
/*
2222
* This is the container for our free-list.
23-
*Node the usage of the linked list here: the library uses offsetof
23+
*Note the usage of the linked list here: the library uses offsetof
2424
* and container_of to manage the list and get back to the parent struct.
2525
*/
2626
typedefstruct
@@ -67,7 +67,7 @@ void defrag_free_list(void)
6767
{
6868
if((((uintptr_t)&lb->block)+lb->size)== (uintptr_t)b)
6969
{
70-
lb->size+=sizeof(*b)+b->size;
70+
lb->size+=ALLOC_HEADER_SZ+b->size;
7171
list_del(&b->node);
7272
continue;
7373
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp