The information in this article applies to:
SUMMARY
You can set the amount of conventional memory that the overlay manager
reserves for loading overlays by using either of the following methods:
MORE INFORMATION
The file MOVEINIT.C contains two alternative versions of the _moveinit
overlay initialization procedure. The first decides what heap size
to request based on the number and size of the overlays and available
memory. The second looks for environment variables to determine memory
usage. This article describes how to modify the version of _moveinit
that does not look for environment variables.
This requests the heap size to be the sum of the sizes of the three largest
overlays. The first argument is the number of overlays. The second argument
is the minimum heap size, which is the size of the largest overlay. Do not
modify the first or second arguments.
The third parameter is the requested heap size, specified in 16-byte paragraphs. You can modify the third argument. However, do not use a value smaller than the variable cparaLarge. For example, the following statement requests the minimum heap size possible:
In another example, the following statement requests a heap size that is
the size of the largest overlay plus 16000 bytes:
You can also set the amount of extended memory (XMS) and expanded memory
(EMS) to be used for caching overlays by modifying the following statement
located at line 168:
This statement allocates enough XMS or EMS memory to cache all overlays.
The first argument to _movesetcache requests XMS memory; the second
requests EMS memory, in kilobytes. You can modify both arguments, but do
not use values larger than ckbXms and ckbEms, respectively.
The following example commands show how to compile and link the NOTEPAD sample program with the C/C++ version 7.0 MOVEINIT.C program. Locate the files MOVEINIT.C and MOVEAPI.H in the current directory. Do not place MOVEINIT.OBJ in an overlay. cl -c -Gs moveinit.cFor more information on _movesetheap and _movesetcache, see the file MOVEAPI.TXT supplied with C/C++ version 7.0. You can find the files MOVEINIT.C, MOVEAPI.H, and MOVEAPI.TXT in the C/C++ version 7.0 subdirectory SOURCE\MOVE. Additional query words: VBmsdos 1.00
Keywords : |
Last Reviewed: December 9, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |