Processes are monitored as components are loaded into memory. Relocation
of a component to an alternate base address instead of its preferred base
address, causes an alternate component to be created corresponding to the
relocated component. The alternate component is a copy of the relocated
component, but the preferred base address of the alternate component is
reset to be the alternate base address of the relocated component.
Additional alternate components may be created for each relocated
component, with each additional alternate component being optimized in a
different manner. Alternate components may be implemented as alternate
data stream of the corresponding relocated components. In response to
subsequent requests to load a selected component into memory, it is
determined whether the selected component has at least one corresponding
alternate component. If so, one of the corresponding alternate components
is loaded into memory instead of the selected component.