Microsoft KB Archive/99079

= Diagnosing &quot;String space corrupt&quot; & &quot;Far heap corrupt&quot; Errors =

Article ID: 99079

Article Last Modified on 8/16/2005

-

APPLIES TO


 * Microsoft Visual Basic for MS-DOS
 * Microsoft BASIC Professional Development System 7.1
 * Microsoft QuickBasic 4.5 for MS-DOS

-



This article was previously published under Q99079



SUMMARY
The errors &quot;String space corrupt&quot; and &quot;Far heap corrupt&quot; 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(&quot;&quot;) 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: KB99079

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.