www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/07/12/19:45:13

Xref: news2.mv.net comp.os.msdos.djgpp:5931
From: John Sabean <docmani AT eng DOT umd DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: DJGPP - Memory Detect Question
Date: Thu, 11 Jul 1996 16:10:29 -0400
Organization: Project GLUE, University of Maryland, College Park, MD
Lines: 24
Message-ID: <31E55FB5.167EB0E7@eng.umd.edu>
NNTP-Posting-Host: x-15.umd.edu
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Is there any way to tell how much physical memory is
available under DJGPP. I'm writing a program that scrolls
a large PCX file. I want to buffer as much of the file as
I can in memory. I have the buffer scheme developed, but
I want to make the program allocate these buffers dynamically.
Right now, the program will buffer an arbitrary amount, but
I don't want to unnecessarily put buffers in swap space.
(IE allocate 16 megs of memory on a machine that only has
8 physical megs of memory... why put a file buffer into
a swap file? That would hurt performance....)

So, is there anyway to get a ball park figure of how much
physical memory there is?

(My other options are to force the use of a disk cache
by the user, or to load the whole thing into virtual
memory and let the DPMI software handle the swaping...
Neither option is very appealing to me)


-- 
<docmani AT eng DOT umd DOT edu ------ http://www.glue.umd.edu/~docmani>
"I've always said you can get more with a kind word and a
 2x4 than you can with a kind word alone!"  - Marcus

- Raw text -


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