www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/25/12:41:41

Sender: nate AT cartsys DOT com
Message-ID: <36337DE3.4DD2B092@cartsys.com>
Date: Sun, 25 Oct 1998 11:37:07 -0800
From: Nate Eldredge <nate AT cartsys DOT com>
X-Mailer: Mozilla 4.05 [en] (X11; I; Linux 2.0.35 i486)
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: Amount of free memory to application...
References: <3632AF88 DOT 28462E72 AT geocities DOT com>
Reply-To: djgpp AT delorie DOT com

Sahab Yazdani wrote:
> 
> Well first of all I'd like to thank everybody for their help with my
> previous problems... now down to the real matters...
> 
> I'd like to know if I can see the amount of free memory that is
> available to the application that I'm writing.  For instance in Watcom I
> could do this:
> 
> void main() {
> // Non-Important Code
>         printf("Amount of Free Memory: %dK\n",_memmax());
> // Non-Important Code
> }
> 
> or something along those lines,  is there any such function in DJGPP?
> 
> its not really important, move that I just want to know if its possible
> (and where other software developers get their info from :=) ).

__dpmi_get_free_mem_info will give you a lot of statistics, but many of
them are not really meaningful.  For instance, `free'd memory is not
released to the DPMI server, but is kept for future `malloc's.  So
`free'ing will not increase the amount of memory that this function will
claim is available.
-- 

Nate Eldredge
nate AT cartsys DOT com

- Raw text -


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