ID: Q88433
7.00 | 1.00 1.50 MS-DOS | WINDOWS kbprg kbprb
The information in this article applies to:
The 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.
The function 0Fh (Resize Memory Block) of the 386MAX XMS handler seems to always return a value indicating that there is not enough extended memory.
There are three ways to work around the problem:
/* 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 KBCategory: kbprg kbprb KBSubcategory: VirtualMem
Keywords : kb16bitonly kbVirtualMem
Version : 7.00 | 1.00 1.50
Platform : MS-DOS WINDOWS
Last Reviewed: July 20, 1997