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> dosrealavail()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 DosRealAvail()
------------------------------------------------------------------------------
 Purpose:
 Get total available real mode memory.

 Syntax:
 USHORT BLXAPI DosRealAvail(PULONG bytesavail);

 Parameters:
 bytesavail  Pointer to a long integer to receive the number of bytes of
             available real mode memory.

 Returns:
 The total available real mode memory in bytes.

 Description:
 DosRealAvail() returns the amount of real mode memory available which may
 be allocated with DosAllocRealSeg().

 Note that the memory freed by DosFreeRealSeg() will only be returned to the
 DOS extender, not all the way to DOS, until the program exits. As a result,
 DosRealAvail() may not reflect the increase in memory, although
 DosAllocRealSeg() will still be able to allocate the memory again.

 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: DosAllocRealSeg() DosFreeRealSeg() DosMemAvail()

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