Mail Archives: djgpp/1998/05/02/20:11:28
help, i have a dpmi question.
i can run this program to display free memory and it works fine.
but when i include the same code into a much larger program,
that also includes allegro, it crashs
is there something else im suppose to do before
calling the _dpmi_get..()
---------------------------------------------------------------------
#include <dpmi.h>
#include <stdio.h>
int main(void)
{
__dpmi_free_mem_info *info; // define pointer
__dpmi_get_free_memory_information( info ); // call to
get info
printf("free mem = %d\n", info->largest_available_free_block_in_bytes);
// display
/* the rest is the other fields of the structure.
* printf("maximum_locked_page_allocation_in_pages = %d\n",
info->maximum_locked_page_allocation_in_pages);
* printf("maximum_unlocked_page_allocation_in_pages = %d\n",
info->maximum_unlocked_page_allocation_in_pages);
* printf("size_of_paging_file_partition_in_pages = %d\n",
info->size_of_paging_file_partition_in_pages);
* printf("total_number_of_free_pages = %d\n",
info->total_number_of_free_pages);
* printf("total_number_of_physical_pages = %d\n",
info->total_number_of_physical_pages);
* printf("total_number_of_unlocked_pages = %d\n",
info->total_number_of_unlocked_pages);
* printf("free_linear_address_space_in_pages = %d\n",
info->free_linear_address_space_in_pages);
* printf("linear_address_space_size_in_pages = %d\n",
info->linear_address_space_size_in_pages);
*/
}
-----------------------------------------
http://www.alphalink.com.au/~ibaxter/aj/
- Raw text -