BUG: Memory Loss From MOVE Overlaid Application

Last reviewed: July 17, 1997
Article 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:

  • Microsoft C/C++ version 7.0
  • Microsoft Visual C++ for Windows, versions 1.0, 1.5, 1.51, and 1.52

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


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 17, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.