[comp.lang.c] Turbo C++ overlays

jdb@reef.cis.ufl.edu (Brian K. W. Hook) (01/28/91)

I have been messing with the overlay features of Turbo C++, and haven't
got them to work quite right.  What I am trying to do is this:

Assuming two source files (main.c and map.c), I want main.c to handle most
of my program, but occasionally it needs to bring a very graphics intensive
map on the screen.  The map is declared as this:

int map[400][400];

Now, it is stored on disk, and do to the way it is constructed I don't want
to access small chunks.  I want all or nothing of it in memory.  So, to 
conserve memory, could I have MAIN.C the main program, and make MAP.C into
an overlaid file?  Would this have it automatically use VROOM to swap
the mega array out of memory?  E.g.

MAIN.C

some functions 

MAP.C    <--- overlay this module

int map[400][400];

some map functions 


Would this give me some 320K of virtual memory?  That would be REAL helpful
if it could.  

Replies via posts or email would be greatly appreciated.

Thanks,

Brian

6600m00n@ucsbuxa.ucsb.edu (Steelworker) (01/29/91)

In article <26541@uflorida.cis.ufl.EDU> jdb@reef.cis.ufl.edu (Brian K. W. Hook) writes:
 
   ...
-   Now, it is stored on disk, and do to the way it is constructed I don't want
-  to access small chunks.  I want all or nothing of it in memory.  So, to 
-  conserve memory, could I have MAIN.C the main program, and make MAP.C into
-  an overlaid file?  Would this have it automatically use VROOM to swap
-  the mega array out of memory?  E.g.
   ...

Nope.   Your best bet is to swap to ems, or back to disk.  

Robert Blair
6600m00n@ucsbuxa.ucsb.edu