www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/21/12:31:58

From: James W Sager Iii <sager+@andrew.cmu.edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Allegro datfiles was:re: Compiler Optimizations
Date: Sat, 21 Mar 1998 09:51:53 -0500
Organization: Junior, MCS Undeclared, Carnegie Mellon, Pittsburgh, PA
Lines: 32
Message-ID: <0p4xE9q00WB_07il00@andrew.cmu.edu>
NNTP-Posting-Host: po8.andrew.cmu.edu
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

>> B) I am unsure of whether the .dat file loads itself fully into memory.     
>> Since my game is a slow paced RPG, I have no need for all the BITMAPs       
>> to be in the memory, and there are ALOT of BITMAPs appx 1000+. I have       
>> other devious uses for the memory...                                        
                                                                              
>Remember about virtual memory.  Even if the entire datafile were loaded,      
>it would be paged out until actually used.  The only overhead would be    

>in loading the file in the first place.  As it is, I believe that             
>Allegro only loads those portions of a datafile that you actually             
>request.                                                                      
                                                                              
The problem is that I'm kinda confused...
My plan was to put all the images into one big file and only pull out a
few out at a time to
put in memory. Allegro will use the cwsdpmi thing to simulate ALOT of
ram, but after a certain
point(memory on chips are used, the hard drive is used and a noticable
slow down occurs
using memory.  On my game, I malloc out a bunch of 40kb levels from one
to a hundred or more...
Malloc is weird in that it will only go up to the extended memory, and
not hit the hard drive.
My questions are:
  	A: If I load up 8 meg of images in a .dat file, and there is exactly
8 meg of 
extended memory: Will I be able to malloc out 4 meg of levels? 
        B: If it doesn't crash, will the game be slowed down because it
has to access the hard
drive at unknown times because its using virtual memory?


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019