[Oberon] SystemV- Heap + Module Space

Andreas Pirklbauer andreas_pirklbauer at yahoo.com
Sun Dec 30 22:02:31 CET 2018


   > Should it not start at lower end with first unused gap? (the other way round)

The module loader (procedure Modules.Load) could of course do that, but
starting with mod = Modules.root  is just the simplest possible code. Doing it
the other way around would also be only a single line of code, but one would
need to traverse the *entire* module list find the best fit at the "lower end".

You can try to refine the module allocation/deallocation strategy. However, this is
one area where it was thought that this would be an optimization in the wrong place.

On "production systems” module unloading is rare, whereas on development
systems, one generally tends to unload “the last loaded” module anyway. And
for that, the few lines of code I provided are entirely adequate.

A much more significant contribution would be to make module unloading “safe”, i.e.
prevent unloading of there are still client, type or procedure variable references.





More information about the Oberon mailing list