[Oberon] memory alligator

R. P. de Jong rdjong at mac.com
Sun Oct 1 11:23:55 CEST 2017

Hi All,

Recently I was pointed out a surprising error in the Oberon-07 system by Joerg Kollmann.
He was testing heap behavior in a single command that uses up all available memory in 
a loop that repeatedly executes NEW()s, until it returns a NIL pointer.
It turned out, in certain cases (allocating small records), the system crashes before 
exiting the loop, with a memory r/w error message like "Alignment error at PC: 504 ..", 
which is typical for a crash on Oberon Workstation.

The problem can be solved by modifying the 32/64/128 allocators such that they check for 
a 0 (NIL) returned from the next larger allocator. If 0, then the upper-half block 
should not be initialized and the corresponding lists administration should not be updated.

Roel de Jong

More information about the Oberon mailing list