| www.delorie.com/djgpp/doc/libc-2.01/libc_369.html | search |
#include <dpmi.h int _go32_dpmi_get_free_memory_information(_go32_dpmi_meminfo *info);
This function fills in the following structure:
typedef struct {
u_long available_memory;
u_long available_pages;
u_long available_lockable_pages;
u_long linear_space;
u_long unlocked_pages;
u_long available_physical_pages;
u_long total_physical_pages;
u_long free_linear_space;
u_long max_pages_in_paging_file;
u_long reserved[3];
} _go32_dpmi_meminfo;
The only field that is guaranteed to have useful data is
available_memory. Any unavailable field has -1 in it.
Zero on success, nonzero on failure.
int phys_mem_left()
{
_go32_dpmi_meminfo info;
_go32_dpmi_get_free_memory_information(&info);
if (info.available_physical_pages != -1)
return info.available_physical_pages * 4096;
return info.available_memory;
}
Go to the first, previous, next, last section, table of contents.
| prev next webmaster | delorie software privacy |
| Copyright © 1997 | Updated Apr 1997 |