summaryrefslogtreecommitdiffstats
path: root/research
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2017-02-10 01:15:36 (EST)
committer P. J. McDermott <pj@pehjota.net>2017-02-10 01:19:29 (EST)
commit297e4a9bb6f0086b6287a61820188be7cc240082 (patch)
tree36e53976314e4028a6eba7630fbdff81d5de9914 /research
parent8ab1fe3d9f123be7856a5538909a8965c0ab2aa6 (diff)
downloadeggshell-297e4a9bb6f0086b6287a61820188be7cc240082.zip
eggshell-297e4a9bb6f0086b6287a61820188be7cc240082.tar.gz
eggshell-297e4a9bb6f0086b6287a61820188be7cc240082.tar.bz2
research/heap.sh: Clear freed block's next_free pointer
Otherwise, __malloc() would fail to detect the last free block.
Diffstat (limited to 'research')
-rw-r--r--research/heap.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/research/heap.sh b/research/heap.sh
index 54ce1e3..e8fbd6f 100644
--- a/research/heap.sh
+++ b/research/heap.sh
@@ -39,4 +39,6 @@ __free()
eval "${__free_tail}_next_free=\${__ptr}"
eval "${__heap}_free_tail=\${__ptr}"
fi
+ # Ensure next_free is null to delimit list end
+ eval "${__ptr}_next_free="
}