heap: Prevent node chain collapse on free

This commit is contained in:
shchmue committed 2019-10-25 11:20:38 -06:00
1 parent 65fbdfddbf
commit 426c86182d
2 files changed
+2

No files matched your search

+1
View File
@@ -56,6 +56,7 @@ static u32 _heap_alloc(heap_t *heap, u32 size, u32 alignment)
node->used = 1;
new->used = 0;
new->next = node->next;
new->next->prev = new;
new->prev = node;
node->next = new;
+1
View File
@@ -56,6 +56,7 @@ static u32 _heap_alloc(heap_t *heap, u32 size, u32 alignment)
node->used = 1;
new->used = 0;
new->next = node->next;
new->next->prev = new;
new->prev = node;
node->next = new;