www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/04/07/11:29:55

Date: Sun, 7 Apr 1996 18:09:36 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Thierry Tremblay <kzinti AT info DOT polymtl DOT ca>
Cc: djgpp AT delorie DOT com
Subject: Re: heap memory left
In-Reply-To: <31670018.5F4E@info.polymtl.ca>
Message-Id: <Pine.SUN.3.91.960407180407.22948A-100000@is>
Mime-Version: 1.0

On Sat, 6 Apr 1996, Thierry Tremblay wrote:

> I need to know how much heap memory is left in my system.
> I'm programming in C++ with djgpp, and writing an editor (like QEdit),
> and would like to print the amount of free memory on the status bar.
> Is there any way to do it?

The current library `malloc' doesn't have any such reporting facilities.  
You will have either to understand how it works and add such facilities, 
or use some other `malloc' that does have them.

On the other hand, as long as sbrk(0) doesn't approach the available
physical memory (i.e., if you don't get close to paging), why should your
users care at all? 

- Raw text -


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