KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q23903: Too Much Data or Mixing Memory Models Causes "Fixup Overflow"

Article: Q23903
Product(s): See article
Version(s): 3.00 4.00 5.00 5.10 6.00 6.00a | 5.10 6.00 6.00a
Operating System(s): MS-DOS | OS/2
Keyword(s): ENDUSER | s_quickc | mspl13_c
Last Modified: 15-JAN-1991

Question:

My large model program compiles fine, but I can't link. At that link
time, I get an L2002 error, "Fixup Overflow." What does this error
mean and how can I work around it?

Response:

This error occurs when a group is larger than 64K. The first suspect
for such a problem is DGROUP, into which goes the stack, the near
heap, and all near data. This can exceed 64K if you have a large
amount of static or global data initialized by the compiler. This
problem can be avoided by doing the following:

1. Explicitly force certain items into segments of their own.

2. Use the far keyword.

3. Specify the /Gt compiler option. This places all such data items
   larger than a given size into their own segments.

If you are trying to mix memory models by applying the near keyword to
a function used by another module, the code for the function and the
call will be placed in different segments. A fixup error will occur if
the segment containing the near address comes before the segment using
it, or if it is more than 64K away from the start of the segment.
Removing the near keyword will correct the problem in this case.

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.

Copyright Microsoft Corporation 1986-2002.