PRB: _vmalloc Fails When Running 386MAXLast reviewed: July 17, 1997Article ID: Q88433 |
7.00 | 1.00 1.50
MS-DOS | WINDOWS
kbprg kbprb
The information in this article applies to:
SYMPTOMSThe function 0Fh (Resize Memory Block) of the 386MAX XMS handler seems to always return a value indicating that there is not enough extended memory. This happens when 386MAX version 6.02 or an earlier version of the 386MAX memory manager is installed and the swaparea parameter to _vheapinit() contains only the _VM_XMS value.
CAUSEThe function 0Fh (Resize Memory Block) of the 386MAX XMS handler seems to always return a value indicating that there is not enough extended memory.
RESOLUTIONThere are three ways to work around the problem:
MORE INFORMATION
Sample Code
/* Compile options needed: None */ #include <stdio.h> #include <stdlib.h> #include <vmemory.h> void main(){ _vmhnd_t handle; if ( !_vheapinit( 0, _VM_ALLDOS, _VM_XMS) ) { printf( "Could not initialize virtual memory manager.\n" ); exit( -1 ); } printf( "Requesting 100 bytes of virtual memory.\n" ); if ( (handle = _vmalloc( 100 )) == _VM_NULL ) { _vheapterm(); printf("Allocation failed\n"); exit( -1 ); } _vheapterm();}
|
Additional reference words: 7.00 1.00 1.50
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |