home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.msdos.programmer
- Path: sparky!uunet!ulowell!woods.ulowell.edu!mcardleb
- From: mcardleb@woods.ulowell.edu
- Subject: * BorlandC++ overlay (or how to get blood from a stone)
- Message-ID: <1992Dec22.193612.1@woods.ulowell.edu>
- Lines: 44
- Sender: usenet@ulowell.ulowell.edu (News manager - ulowell)
- Organization: University of Lowell
- Date: Wed, 23 Dec 1992 00:36:12 GMT
-
- Hi all,
-
- Got a problem with the new Borland C/C++ 3.1 protected mode compiler.
-
- I got this compiler because I thought it would compile a protected mode program
- (Borland does say it "breaks the 640K barrier" but all they mean is the
- compiler runs in protected mode. I sure wish they would mean what they say!
-
- Anyway, I am trying to use the overlay manager in the IDE. I am trying to
- access multiple data arrays that each could be larger than 64K bytes. I am
- just writing a demo program now to test if the overlay system will help.
- I have three modules(each one has one function) . Each function has the line:
-
- static unsigned char huge arrayx[250000];
-
- I do some setting of the arrays and then return to the previous module.
-
- The module with main() initializes the overlay manager with
-
- _ovrbuffer = 0x8000;
- _OvrInitExt(0,0);
-
- This gives me all the extended memory for the overlay swapper with 0x80000 of
- overlay buffer (524288 bytes if I calculated this correctly - the Borland
- manuals don't say how this number is calculated but I can guess it is the
- number of paragraphs).
-
- The compiler is compiling in DOS overlay with the HUGE memory model.
-
- Now it will compile, executable is over 750,000 bytes but when I run it from
- the IDE it says not enough memory. I have 2M in the IDE and another 2M not
- used. When I run it from DOS it says cannot execute prog.c. I guess this is
- because DOS won't allow 750,000 to fit in < 640K.
-
- Anybody have a clue to what goes on. I wouldn't like to think Borland is
- false advertising with their compiler. I would loose a lot of respect for
- PC's in general if vendors sell full blown pc's with tons of memory that
- only the pros can use.
-
- Thanks for any replies or comments.
- Bruce
- --
- Bruce McArdle / So THIS is what being a GRAD student
- mcardleb@woods.ulowell.edu / is all about... oUUUUUUUU . . .
-