[Oberon] PO2013 - Show Heap Blocks
Tomas Kral
thomas.kral at email.cz
Wed Jun 24 12:05:24 CEST 2020
On Wed, 24 Jun 2020 08:45:09 +0100
Paul Reed <paulreed at paddedcell.com> wrote:
> 4. The already-observed corruption can be detected by walking each
> free list and doing a sanity check on the pointers (will fail with
> the data you have shown us)
I am testing this, if not too silly an idea.
PROCEDURE GetBlock32(VAR p: LONGINT);
VAR q: LONGINT;
BEGIN
IF list3 # 0 THEN p := list3; SYSTEM.GET(list3+4, q); (*mark*)
IF q = -1 THEN SYSTEM.GET(list3+8, list3) (*next*) ELSE list3 := 0 END
ELSE GetBlock64(q); SYSTEM.PUT(q+32, 32); SYSTEM.PUT(q+36, -1); SYSTEM.PUT(q+40, list3);
list3 := q + 32; p := q
END
END GetBlock32;
Now list32 proc reports these sort of lines, only one line per call, why not more lines?
000628C0 FFFFFFFF 00000000 <== last free
0006BF60 FFFFFFFF 0006BD60 <== already used
00064BE0 FFFFFFFF 00000000 <== last free
--
Tomas Kral <thomas.kral at email.cz>
More information about the Oberon
mailing list