BBS: Inland Empire Archive
Date: 06-02-92 (21:08) Number: 109
From: MATT HART Refer#: NONE
To: ZACK JONES Recvd: NO
Subj: Binary File Copying Conf: (2) Quik_Bas
>> relation to the DOS buffers. Using REDIM rather than DIM will
>> place Transfer into Far Memory rather than Dgroup, and using the
ZJ> subject. I've captured it and will implement it - one day I'll
ZJ> understand it! As always, thanks for the assist!
Most welcome. Let's see if I can clarify some things.
QB 4.5 and PDS Near Strings split system memory into 3
parts: Code space (for your EXE code), Data Group
(Dgroup), and the far heap.
Code space is the amount your .EXE code PLUS any run-
time library needs from DOS. Dgroup is a single 64K DOS
segment, and the far heap is everything that is left.
Dgroup is where everything except:
TYPE Arrays (REDIM)
Numeric Arrays (int, single, long, etc...) (REDIM)
Fixed length string arrays (REDIM)
is held. Variable length string and string arrays, simple numeric variables
(non-arrays), TYPE definitions, fixed length non-array (DIM
A AS STRING * 10), TYPE simple variables (DIM A AS MyType),
and lots of other junk is held. If you don't do a
heap will be put into dgroup. I always use REDIM and
fill up fast. If you use multiple CALLs and GOSUBs and
FUNCTIONs nested within each other, they all take up stack
space. When you use LINK, you can increase the stack
space, but it steals from Dgroup to do it. Most of my
programs end up with 25K or so of dgroup left. But a
couple of really huge ones only have 10K or less. And
there are things I'm going to have to add!
* Origin: Midnight Micro! V.32/REL (918)451-3306 (1:170/600)