Previous: 4.67.2.50. MaxAvail function To the Table of Contents Next: 4.67.2.52. MkDir procedure
4.67.2.50. MaxAvail function Table of Contents 4.67.2.52. MkDir procedure

- 4.67.2.51. -
Table of Contents
4. Standard Units
4.67. System - Built-in routines
4.67.2. System Unit Procedures and Functions
4.67.2.51. MemAvail function


4.67.2.51. MemAvail function

Targets: MS-DOS, OS/2, Win32

System Unit

Returns the amount of all free memory in the heap.

Declaration:
function MemAvail: dword;
Restrictions:

A common practice is to preserve the amount of memory available at the beginning of a program, and then verifying the amount at the end is the same (thus, ensuring there are no allocated pages still present). When allocating a large amount of memory (> 1MB) in DOS, the GetMem() function will allocate some memory internally. Therefore, the difference at the end of the program may not accurately reflect GetMem()/FreeMem() pairings. Also, in Win32, the information returned is volatile. There is no guarantee that two sequential calls to this function will return the same information.


Previous: 4.67.2.50. MaxAvail function To the Table of Contents Next: 4.67.2.52. MkDir procedure
4.67.2.50. MaxAvail function Table of Contents 4.67.2.52. MkDir procedure

- 4.67.2.51. -