www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/16/05:40:30

Xref: news2.mv.net comp.os.msdos.djgpp:3897
From: Shawn Hargreaves <slh100 AT york DOT ac DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: alternative to BC coreleft() ? (or coreused ())
Date: Wed, 15 May 1996 10:22:13 +0100
Organization: The University of York, UK
Lines: 27
Message-ID: <Pine.SGI.3.91.960515100109.20167A-100000@tower.york.ac.uk>
NNTP-Posting-Host: tower.york.ac.uk
Mime-Version: 1.0
In-Reply-To: <31989F6D.7E297A16@alcyone.com>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On Tue, 14 May 1996, Erik Max Francis wrote:

> Eli Zaretskii wrote:
> 
> > What DJGPP does let you know is the amount of memory that was not yet
> > requested by the application from the DPMI server.  Check out the
> > functions that report free physical RAM and available virtual memory.
> 
> Since he was asking about Borland C's coreleft, I think this really is 
> what he meant to ask for.

But in a real life situation these functions are pretty useless, for 
several reasons. If you check the amount of available memory, 
call malloc(1024*1024*1024), and check the free memory size again, it won't 
change very much, at least under cwsdpmi. The memory isn't actually 
allocated until you touch it, which means the free space reporting can 
give some weird results. Also, under a multitasking OS, other apps will 
use both physical and virtual ram, so the amount free may change 
unpredictably without you doing anything to it. 


/*
 *	Shawn Hargreaves.        Why is 'phonetic' spelt with a ph?
 *	Check out Allegro and FED on http://www.york.ac.uk/~slh100/
 */


- Raw text -


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