Table of Contents

This is part of Family API which allow to create dual-os version of program runs under OS/2 and DOS

Note: This is legacy API call. It is recommended to use 32-bit equivalent

2021/09/17 04:47 · prokushev · 0 Comments
2021/08/20 03:18 · prokushev · 0 Comments

DosMemAvail

This call returns the size of the largest block of free memory.

Syntax

DosMemAvail (MemAvailSize)

Parameters

Return Code

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.

Bindings

C

#define INCL_DOSMEMMGR
USHORT  rc = DosMemAvail(MemAvailSize);
PULONG  MemAvailSize;  /* Size available (returned) */
USHORT  rc;            /* return code */

MASM

EXTRN  DosMemAvail:FAR
INCL_DOSMEMMGR      EQU 1
 
PUSH@  DWORD   MemAvailSize  ;Size available (returned)
CALL   DosMemAvail
 
Returns WORD

Note

Text based on http://www.edm2.com/index.php/DosMemAvail