summaryrefslogtreecommitdiffstats
path: root/research/heap.txt
diff options
context:
space:
mode:
Diffstat (limited to 'research/heap.txt')
-rw-r--r--research/heap.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/research/heap.txt b/research/heap.txt
index 4ec78f1..53b6250 100644
--- a/research/heap.txt
+++ b/research/heap.txt
@@ -20,11 +20,11 @@ Functions
return ++heap->top
else
block = heap->free_head
- if heap->free_head->next_free set
- heap->free_head = heap->free_head->next_free
- else
+ if heap->free_head == heap->free_tail
unset heap->free_head
unset heap->free_tail
+ else
+ heap->free_head = heap->free_head->next_free
return block
free(heap, ptr)
if heap->free_tail unset