PRB: _vmalloc Fails When Running 386MAX

ID: Q88433

7.00 | 1.00 1.50 MS-DOS | WINDOWS kbprg kbprb

The information in this article applies to:

SYMPTOMS

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.

CAUSE

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.

RESOLUTION

There are three ways to work around the problem:

Qualitas has confirmed this to be a problem in 386MAX version 6.02 and in earlier versions. This problem was corrected in 386MAX version 6.02a. To obtain an updated version of 386MAX, use a modem to call the Qualitas BBS at (301) 907-8030. Your 386MAX serial number is required as part of the BBS login procedure. Request the updated version of 386MAX by leaving a message for the BBS sysop.

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 KBCategory: kbprg kbprb KBSubcategory: VirtualMem

Keywords          : kb16bitonly kbVirtualMem 
Version           : 7.00   | 1.00 1.50
Platform          : MS-DOS WINDOWS

Last Reviewed: July 20, 1997