delorie.com is funded by banner ads.
  www.delorie.com/djgpp/v2faq/faq120.html   search  

| Previous | Next | Up | Top |

15.3 Failure to get more memory than is physically installed

Q: When I try to access more memory than the free physical RAM, malloc returns a NULL pointer, or I get some cryptic error message, like "Memory Paging Violation" or "Unrecoverable Exception: 000Eh".


A: This is typical of Quarterdeck's DPMI host called QDPMI which comes with QEMM386 version 7.53 and earlier. Some versions of QDPMI (those which come with QEMM v6.x) fail to resize memory blocks when the new size is more than the available physical RAM, even though virtual memory services are enabled; other versions (those which come with QEMM v7.x) just don't let you allocate more memory than is physically available. If you must use more RAM than is physically available, disable or uninstall QDPMI, as described in virtual memory with QEMM, and use CWSDPMI instead.

This bug was corrected in QDPMI version 1.10 or later, distributed with QEMM beginning with version 8.0, so upgrading to the latest version of QEMM might also be a solution. With QEMM 6.x, make sure your programs don't override the default type of sbrk behavior by setting _crt0_startup_flags to _CRT0_FLAG_UNIX_SBRK (QEMM 8.0 and later can allocate virtual memory with both types of sbrk algorithm).

If you use another DPMI host, make sure that virtual memory is enabled. E.g., for 386Max, include the swapfile= parameter to establish a virtual memory swap file; you can make it permanent (this will speed up DJGPP start-up) with the /p option.


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright ⌐ 1998   by Eli Zaretskii     Updated Sep 1998  

Powered by Apache!

You can help support this site by visiting the advertisers that sponsor it! (only once each, though)