How the Standard and Extended FoxPro Versions Use MemoryLast reviewed: April 17, 1995Article ID: Q88578 |
The information in this article applies to:
SUMMARYMicrosoft FoxPro versions 2.0 and later for MS-DOS can run in either the Standard or Extended version when the computer has an 80386SX or higher processor. However, the two FoxPro versions differ in their memory use.
MORE INFORMATION
Standard Version Memory UseThe code for the Standard version is packaged in two pieces: the root portion (in the FOXPRO.EXE file) and a collection of additional code segments (in the FOXPRO.OVL file). When FoxPro starts up, the root portion is loaded into memory and certain other fixed-sized memory allocations occur. The code and data require about 290K of memory. The collection of code segments requires approximately 1.1 MB of storage on the disk. After the root portion is loaded into memory, the balance of conventional memory (memory addressed below 640K), any available upper memory blocks (UMBs), and 64K of expanded memory (for systems running according to the Lotus-Intel Microsoft [LIM] version 4.0 Expanded Memory Specification [EMS]) is available to FoxPro as a general-purpose memory pool that can contain any user and system data (for example, BROWSE sessions, code segments, memory variables, windows, and so on) and I/O buffers. Any other EMS memory is used to hold I/O buffers and to store inactive code segments. FoxPro loads additional code segments on demand. These segments float freely throughout all available memory, in both the general and expanded memory pools. When free memory is required for other purposes, the least- recently-used (LRU) code segment is removed from memory. Because the root segment is relatively small, the Standard version can run with less than 400K of free memory. However, for most applications, 512K is a more realistic minimum memory size. For all applications, additional memory can greatly improve execution speed.
Extended Version Memory UseMemory in the First Megabyte of Address Space:
Reasons to Use Each VersionIn the Standard version, FoxPro code segments are loaded into memory on demand; they need not be in memory at all times. Also, the Standard version does not reserve space for the MS-DOS Extender application. Therefore, for a given amount of memory installed in a machine, about 1.1 MB more memory is potentially available to store I/O buffers when the Standard version is running than when the Extended version is running. However, not all the additional memory may actually be available to store buffers. When a large application is running, much of the memory may be used to store code segments or other data. Because the speed of an I/O operation can be very sensitive to the amount of free memory, an I/O-intensive program might greatly benefit from the additional memory provided by the Standard version. Obviously, an extra megabyte of buffer memory will significantly affect performance on a machine with only 3 MB of memory installed. For this reason, the Standard version will most likely run an I/O benchmark faster than the Extended version on a machine with limited memory. However, the marginal advantage provided by this additional buffer of memory becomes much smaller as additional memory is installed. However, if an application consists primarily of data entry and the maximum interface response is required, even when many new features are used, the Extended version may be a better choice, even on a machine with a limited amount of memory. Because the Extended version loads all FoxPro code into memory, segment-loading overhead is eliminated. In the Extended version, the size of the programs, the number of windows, string storage space, the number of memory variables, and so on, are limited only by the amount of memory on the machine. In the Standard version, a maximum of 460K of total free memory is available for general purposes. Therefore, a very large or complex application, particularly one that heavily uses the SQL interface, mandates use of the Extended version. On a machine with 3 MB or less of installed memory, it is possible to develop programs that run in the Standard version but that do not run in the Extended version because the internal data structures are larger. However, this situation is quite rare. By default, demand paging is activated when the Extended version is running on any machine that has less than 2.5 MB of total memory. The overhead imposed by demand paging becomes larger as free memory becomes smaller. Less memory requires more swapping. NOTE: To disable the Extended version's demand paging feature, add the DOSMEM=ON statement to the CONFIG.FP file. Keep in mind that when demand paging is disabled, FoxPro is unable to run programs or load code (API) libraries. If a machine has 4 MB or more of total memory, using the Extended version is recommended. However, no matter how much memory exists, the Standard version may have more memory available to hold buffers than the Extended version does. For this reason, it is sometimes possible to develop an I/O benchmark in which the Standard version runs faster. If a machine has between 3 and 4 MB of total memory, the Extended version is usually better. If the machine has between 2 and 3 MB of total memory, the version choice depends largely on the specific application. If the machine has 2 MB or less of total memory, the Standard version is recommended.
|
Additional reference words: FoxDos 2.00 2.50 2.50a 2.50b 2.60 2.60a
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |