Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Blinker 5.10 Online Reference - <b> dosvmavail()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 DosVMAvail()
------------------------------------------------------------------------------
 Purpose:
 Get the amount of available virtual memory.

 Syntax:
 USHORT DosVMAvail(PULONG bytes);

 Parameters:
 bytes  Pointer to a long integer to receive number of bytes of available
        virtual memory.

 Returns:
 The total available virtual memory in bytes.

 Description:
 DosVMAvail() returns the approximate number of bytes of virtual memory
 available to the protected mode program.

 Example:
 #include <stdio.h>                                                          
 #include <blx286.h>                                                         
                                                                             
 void main(void)                                                             
 {                                                                           
 ULONG vmfree, xmfree, rmfree;                                               
                                                                             
 if (DosVMAvail(&vmfree) == 0)                                               
    printf("There are %08X bytes free virtual memory\n", vmfree);            
 if (DosMemAvail(&xmfree) == 0)                                              
    printf("There are %08X bytes free extended memory\n", xmfree);           
 if (DosRealAvail(&rmfree) == 0)                                             
    printf("There are %08X bytes free real memory\n", rmfree);               
 }                                                                           

See Also: DosMemAvail() DosRealAvail()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson