BUG: Memory Loss From MOVE Overlaid Application

ID: Q94582

7.00 | 1.00 1.50 1.51 1.52 MS-DOS | WINDOWS kbtool kbcode kbbuglist

The information in this article applies to:

SYMPTOMS

An application created for the MS-DOS environment that uses the Microsoft Overlay Virtual Environment (MOVE) loses extended or expanded memory.

CAUSE

When the application is linked together, the Microsoft C run-time library is not specified first in the list of libraries.

RESOLUTION

Modify the linker command line to list the Microsoft C run-time library as the first library.

STATUS

Microsoft has confirmed this to be a problem in products listed above. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

This error occurs when a MOVE application uses the graphics library distributed with Visual C++ and the graphics library is listed before the C run-time library.

The following sample code demonstrates this problem. Each time you run this application, 4,096 bytes of extended memory is lost and becomes unavailable. Use mem to verify this.

Sample Code

/*
 * Compile options needed: /AM or /AL
 * Linker command to reproduce problem:
 *   /NOD main over, test.exe,, graphics mlibce, test.def
 * Linker command to work around problem:
 *   /NOD main over, test.exe,, mlibce graphics, test.def
 */ 

MAIN.C

#include <graph.h>

void func(void);

void main()
{
   struct videoconfig vc;

   _getvideoconfig(&vc);
   func();
}

OVER.C

void func()
{
   printf("In func...\n");
}

TEST.DEF

SEGMENTS

   main_text ovl:0
   over_text ovl:1

Additional reference words: 7.00 1.00 1.50 KBCategory: kbtool kbcode kbbuglist KBSubcategory: MoveOverlay Keywords : kb16bitonly

Last Reviewed: July 18, 1997