[Oberon] PO2013 - Show Heap Blocks

Paul Reed paulreed at paddedcell.com
Wed Jun 24 09:45:09 CEST 2020


Hi Tomas,

> Apologies for the confusion, until now I confused only myself :-)

Don't worry.  But since it seems difficult to give complete or even 
correct information let's take a step back:

1. The garbage collector runs when there is an empty stack, marking as 
used all memory found recursively starting only from pointers in each 
module's static data area.  Everything else is marked as free and placed 
on one of four free lists.

2. The language ensures that memory cannot be corrupted in normal 
operation.

3. Code which uses SYSTEM can corrupt memory if not written correctly.

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).

Improving slightly the tools you now have, you should be able to zero in 
on when the corruption occurs, assuming 1. and 2. are not violated.

HTH,
Paul


More information about the Oberon mailing list