As Keykos adapted IBM’s PL/I and H assembler for native use, we soon discovered that they both performed similar initializattion steps before they read the content of the task at hand. These apps were both designed before virtual memory was on the horizon or even a common concept. The application would learn how much memory it had available and subdivide most of that memory into blocks and initialize those blocks in some repetitive pattern and only then read the input file. Having virtual memory it was strategic for Keykos to provide the application a full 16 MB since only the actually required memory would be reified into real memory. The peculiar initialization patterns of these two apps thwarted this plan.
The solution was that upon building the app (not launching it) let the app have 16MB, let it initialize and then just as it came to read its input, capture its state, including the many initialized blocks and ‘compress’ them with an ad-hoc scheme that was designed with those specific simple patterns in mind. Upon application launch the compiler as it appeared post initialization was installed in a Keykos segment, and a physically small special segment was created that was compression of the 15MB initialized pattern.
The compiler and assembler had different but similar patterns that were each discovered and “compressed” upon new releases from IBM. Several such releases were thus accommodated. Without delving into the logic of the app were able in this particular cases to give the advantages of virtual memory to applications written without that in mind. Also note that the binding of common library references in the code, to shared libraries was done in the infrequent initialization step rather than in the frequent launch step.