From 297e4a9bb6f0086b6287a61820188be7cc240082 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Fri, 10 Feb 2017 01:15:36 -0500 Subject: research/heap.sh: Clear freed block's next_free pointer Otherwise, __malloc() would fail to detect the last free block. --- 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=" } -- cgit v0.9.1