SETMEM(0) Returns Total Heap, FRE(-1) Returns Available Heap (47758)
The information in this article applies to:
- Microsoft QuickBASIC 4.0
- Microsoft QuickBASIC 4.0b
- Microsoft QuickBASIC 4.5
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0b
- Microsoft Basic Professional Development System for MS-DOS 7.0
This article was previously published under Q47758 SUMMARY
The program shown below demonstrates the difference between the
SETMEM(0) and FRE(-1) functions. SETMEM(0) returns the TOTAL possible
amount of far heap space, while FRE(-1) returns the far heap space
minus any data (in DGROUP or far heap) that is currently allocated.
For Microsoft Basic PDS Version 7.00, FRE(-1) refers only to far heap;
to get available expanded memory you must use FRE(-3).
This information applies to QuickBasic Versions 4.00, 4.00b, and 4.50,
to Microsoft Basic Compiler Versions 6.00 and 6.00b for MS-DOS, and to
Microsoft Basic PDS Version 7.00 for MS-DOS.
Modification Type: | Minor | Last Reviewed: | 8/16/2005 |
---|
Keywords: | KB47758 |
---|
|