Node:QDPMI VM,
Next:QDPMI alloc,
Previous:Confusing alloc,
Up:Memory
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 QDPMI by going to the QEMM directory and typing this:
qdpmi off
DJGPP programs will then 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 set _crt0_startup_flags
to _CRT0_FLAG_UNIX_SBRK
,
which overrides the default type of 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.