Just a little question

Checkpoint Technologies ckp at grebyn.com
Fri Apr 12 12:28:14 AEST 1991


In article <1276 at sicsun.epfl.ch> stauffer at masg1.epfl.ch (Laurent Stauffer) writes:
>Hello,
>I just want to know if there is a function which returns the 
>amount of free dynamic memory ? 

If you want to write a portable program, no.  There is nothing you can
count on to tell you in advance how much memory you are allowed to
malloc. You can only count on being told when you have run out, when
malloc returns NULL.

If you know more about your particular platform, and don't mind losing
portability to other platforms, then you may find something in your
OS services or compiler vendor's library that does it.
-- 
First comes the logo: C H E C K P O I N T  T E C H N O L O G I E S      / /  
                                                ckp at grebyn.com      \\ / /    
Then, the disclaimer:  All expressed opinions are, indeed, opinions. \  / o
Now for the witty part:    I'm pink, therefore, I'm spam!             \/



More information about the Comp.lang.c mailing list