QBX.EXE "Out of Data Space" for Variable-Length String Array (65034)
The information in this article applies to:
- Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2 7.0
- Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2 7.1
This article was previously published under Q65034 SUMMARY
The 4-byte string descriptor for each variable-length string resides
in DGROUP (the 64K near heap) regardless of the compiler string option
(near or far).
When using the far strings option (BC /Fs option, or running within
QBX.EXE), only the contents (not the 4-byte descriptors) of the
variable-length string are stored in the far segments. Large string
arrays (near or far) can quickly fill up DGROUP with string
descriptors, as shown in the examples below.
This article illustrates how you can get both "Out of Data Space" and
"Out of Memory" messages in QBX.EXE using an empty variable-length
string array (dynamic or static) that fills up DGROUP with 4-byte
string descriptors.
This article also illustrates how, from a compiled .EXE program, you
can get an "Out of String Space" message at run time when allocating
dynamic variable-length string arrays and how you can get a "LINK :
Fatal error L2041: Stack plus data exceed 64K" message at LINK time
when allocating static variable-length string arrays, due to filling
up DGROUP with 4-byte string descriptors.
This information applies to Microsoft Basic Professional Development
System (PDS) versions 7.00 and 7.10 for MS-DOS and MS OS/2.
REFERENCES
See Pages 719-720, "Variable Storage and Memory Use," and also Chapter
11, "Advanced String Storage," in the "Microsoft Basic 7.0:
Programmer's Guide" for Basic PDS versions 7.00 and 7.10.
Modification Type: | Major | Last Reviewed: | 10/20/2003 |
---|
Keywords: | KB65034 |
---|
|