Overlay (programming) - Example

Example

The following example shows the control statements that instruct the OS/360 Linkage Editor to link an overlay program, indented to show structure:

INCLUDE SYSLIB(MOD1) INCLUDE SYSLIB(MOD2) OVERLAY A INCLUDE SYSLIB(MOD3) OVERLAY AA INCLUDE SYSLIB(MOD4) INCLUDE SYSLIB(MOD5) OVERLAY AB INCLUDE SYSLIB(MOD6) OVERLAY B INCLUDE SYSLIB(MOD7) +--------------+ | Root Segment | | MOD1, MOD2 | +--------------+ | +----------+----------+ | | +-------------+ +-------------+ | Overlay A | | Overlay B | | MOD3 | | MOD7 | +-------------+ +-------------+ | +--------+--------+ | | +-------------+ +-------------+ | Overlay AA | | Overlay AB | | MOD4, MOD5 | | MOD6 | +-------------+ +-------------+

These statements define a tree consisting of the permanently resident segment, called the root, and two overlays A and B which will be loaded following the end of MOD2. Overlay A itself consists of two overlay segments, AA, and AB. At execution time overlays A and B will both utilize the same memory locations; AA and BB will both utilize the same locations following the end of MOD3.

All the segments between the root and a given overlay segment are called a path.

Read more about this topic:  Overlay (programming)

Famous quotes containing the word example:

    Our intellect is not the most subtle, the most powerful, the most appropriate, instrument for revealing the truth. It is life that, little by little, example by example, permits us to see that what is most important to our heart, or to our mind, is learned not by reasoning but through other agencies. Then it is that the intellect, observing their superiority, abdicates its control to them upon reasoned grounds and agrees to become their collaborator and lackey.
    Marcel Proust (1871–1922)