[Oberon] Safe module unloading

Andreas Pirklbauer andreas_pirklbauer at yahoo.com
Wed Nov 9 09:37:20 CET 2016


This is just to drop a note that after receiving (and incorporating) much welcomed feedback from some members of this community on "safe module unloading", a new version of it is now available at  https://github.com/andreaspirklbauer/Oberon-experimental (see files Kernel.Mod, Modules.Mod and System.Mod). The documentation has been adjusted accordingly.

By default, a module is now unloaded only if no clients *and* no references to it exist in the remaining modules and data structures. But if the /f option is specified, a module can also be "unloaded" in the presence of references to it. In that case however, the module is only removed from the *list* of loaded modules, while the associated module data (including its type descriptors) is preserved in memory for as long as necessary, and is automatically removed if no more references exist in the remaining part of the system.

PS: For those who really want to hang on to it, the original option to "force remove" a module *and* its module data from memory even if references exist (/u option), has now been moved to a variant of the implementation in the same repository (affected modules use suffix WithForceUnload in the module name). In that case, type descriptors are preserved in memory (similar to Ceres-Oberon, but not on the heap), so that other modules can still refer to them, and all references from other modules to the unloaded module are "made safe" (procedure variables are set to an "empty" procedure), so that the system doesn't become unstable after removal. However, with the modified /f option, as outlined above, this option is really no longer needed.

Andreas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20161109/e10f5d42/attachment.html>


More information about the Oberon mailing list