LINK Help (linkx.hlp) (Table of Contents; Topic list)
Restrictions on Overlays
                                             Up Contents Index Back
─────Restrictions on Overlays───────────────────────────────────────────────
 
     Not all programs can use overlays. You will probably need to
     reorganize the code to accommodate the limitations explained
     below. Even after reorganization, some programs might not be
     convertible to overlay form or might not show a significant
     reduction in the amount of memory needed to execute them.
 
        ■ You can use overlays only in programs with multiple code
          segments because separate segment names are needed for
          overlays. Only code is overlaid, not data. The data becomes
          part of the root of the program that is always in memory.
 
        ■ Only 255 overlays can be specified. The program can define
          only 255 logical segments (segments with different names).
          This limits an overlaid program to 16 megabytes.
 
        ■ You must structure your program so that only one overlay
          needs to be in memory at any time (in addition to the root).
 
        ■ Duplicate names for different overlays are not supported;
          each module can appear only once in a program.
 
        ■ You must use far call/return instructions to transfer control
          between overlaid files. You cannot overlay files containing
          near routines if other overlays call those routines.
 
        ■ You cannot jump out of or into overlaid files using the
          longjmp C-library function. (However, you can use long jumps
          within an overlaid file.)
 
        ■ You cannot call routines using function pointers out of or
          into overlaid files. (However, you can call a routine using
          a function pointer within an overlaid file.)
 
        ■ You cannot use the same public name in different overlays.
 
        ■ The code required to manage overlays adds about 2K to 3K to
          the size of the root.
                                    -♦-