mirror of
https://github.com/CTCaer/hekate.git
synced 2024-12-26 00:16:33 +00:00
heap: Prevent node chain collapse on free
This commit is contained in:
parent
65fbdfddbf
commit
426c86182d
@ -56,6 +56,7 @@ static u32 _heap_alloc(heap_t *heap, u32 size, u32 alignment)
|
|||||||
node->used = 1;
|
node->used = 1;
|
||||||
new->used = 0;
|
new->used = 0;
|
||||||
new->next = node->next;
|
new->next = node->next;
|
||||||
|
new->next->prev = new;
|
||||||
new->prev = node;
|
new->prev = node;
|
||||||
node->next = new;
|
node->next = new;
|
||||||
|
|
||||||
|
@ -56,6 +56,7 @@ static u32 _heap_alloc(heap_t *heap, u32 size, u32 alignment)
|
|||||||
node->used = 1;
|
node->used = 1;
|
||||||
new->used = 0;
|
new->used = 0;
|
||||||
new->next = node->next;
|
new->next = node->next;
|
||||||
|
new->next->prev = new;
|
||||||
new->prev = node;
|
new->prev = node;
|
||||||
node->next = new;
|
node->next = new;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user