Mail Archives: djgpp/1997/09/24/11:02:55
On Tue, 23 Sep 1997, Mike Darrett wrote:
> I need to write a program that has *frequent* disk access, i.e. it
> reads pieces of a MASSIVE data file, using fseek() to get to the regions
> it needs.
How massive is the file? If you need to seek a lot, maybe it's better to
read it all into memory? In DJGPP, you can read a few megabytes without
risking slow-down due to VM paging on most machines.
> The question is, since I am assuming the msdos file io commands
> are in real mode, does this pose a problem to djgpp's 32-bit protected
> mode, i.e. will the cpu be switching back & forth bet. real/protected
> mode? This is slow, correct?
If you read the file in large chunks, it is not so slow as you might
think. Try a simple benchmark and see for yourself.
> Will using PMode instead of CWSDPMI be any help?
Not really. Most of the overhead of the mode switch is NOT due to
DPMI host internals.
- Raw text -