DosMemAvail: Difference between revisions
Appearance
Created page with "==Description== This call returns the size of the largest block of free memory. ==Syntax== <PRE> DosMemAvail (MemAvailSize) </PRE> ==Parameters== ; MemAvailSize (PULONG..." |
No edit summary |
||
Line 1: | Line 1: | ||
[[image:legacy.png]] | |||
This function has been eliminated since OS/2 2.0 [https://books.google.com.ec/books?id=u7WbsmbttwYC&pg=PT372&lpg=PT372&dq#v=onepage&q&f=false] | |||
==Description== | ==Description== | ||
This call returns the size of the largest block of free memory. | This call returns the size of the largest block of free memory. |
Revision as of 03:30, 29 August 2016
This function has been eliminated since OS/2 2.0 [1]
Description
This call returns the size of the largest block of free memory.
Syntax
DosMemAvail (MemAvailSize)
Parameters
- MemAvailSize (PULONG) - output
- Address of the size of the largest free block of memory.
Return Code
rc (USHORT) - return
Return code description is:
- 0 NO_ERROR
Remarks
DosMemAvail allows an application to determine how heavily used system memory is at a particular time. The returned value is a "snapshot" that may be valid only at the moment this function is issued and can be expected to change at any time due to system activity.
This call can be used as an indicator for memory availability before a call to DosAllocHuge is made.
Example Code
C Binding
#define INCL_DOSMEMMGR USHORT rc = DosMemAvail(MemAvailSize); PULONG MemAvailSize; /* Size available (returned) */ USHORT rc; /* return code */
MASM Binding
EXTRN DosMemAvail:FAR INCL_DOSMEMMGR EQU 1 PUSH@ DWORD MemAvailSize ;Size available (returned) CALL DosMemAvail Returns WORD