Diagnosing "String space corrupt" & "Far heap corrupt" Errors

ID: Q99079


The information in this article applies to:
  • Microsoft Visual Basic Standard and Professional Editions for MS-DOS, version 1.0
  • Microsoft BASIC Professional Development System (PDS) for MS-DOS, version 7.1
  • Microsoft QuickBASIC for MS-DOS, version 4.5


SUMMARY

The errors "String space corrupt" and "Far heap corrupt" occur when Basic detects that its memory areas are damaged. Possible causes are:

  • incorrectly using the POKE or BLOAD statements


  • calling C or assembly language routines or third party libraries that modify Basic's memory incorrectly


  • incompatible terminate-and-stay-resident (TSR) programs or device drivers


To help narrow down the point in your program where memory becomes corrupt, you can add certain statements to cause Basic to check memory consistency.

The following functions and statements cause Basic to check its memory:

   FRE(-1)
   FRE(A$)
   FRE("")
   STACK
   REDIM 
In the interpreter environment, you can place one of these functions in a debug watch expression, causing Visual Basic to invoke the function automatically after every statement.


MORE INFORMATION

MS-DOS may display one of the following errors when its memory areas are damaged:

Memory Allocation Error
Memory Control Blocks Destroyed
Cannot load COMMAND, system halted

Additional query words: VBmsdos QuickBas BasicCom 1.00 7.10 4.50

Keywords :
Version : MS-DOS:1.0,4.5; :7.1
Platform : MS-DOS
Issue type :


Last Reviewed: December 4, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.