[Oberon] PO2013 - Show Heap Blocks

Tomas Kral thomas.kral at email.cz
Wed Jun 24 12:09:45 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 per call?

EDIT
 0006FB00 FFFFFFFF 00000000
 0006F940 FFFFFFFF 0006F400
 0006F400 FFFFFFFF 0006EB60
 0006EB60 FFFFFFFF 0006BE20
 0006BE20 FFFFFFFF 0006BD60
 0006BD60 FFFFFFFF 0006BBE0
 0006BBE0 FFFFFFFF 0006BB20
 0006BB20 FFFFFFFF 0006A400

-- 
Tomas Kral <thomas.kral at email.cz>


More information about the Oberon mailing list