Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!pa.dec.com!decuac!grebyn!ckp From: ckp@grebyn.com (Checkpoint Technologies) Newsgroups: comp.lang.c Subject: Re: Just a little question Message-ID: <1991Apr12.022814.9014@grebyn.com> Date: 12 Apr 91 02:28:14 GMT References: <1276@sicsun.epfl.ch> Organization: Grebyn Timesharing Lines: 18 In article <1276@sicsun.epfl.ch> stauffer@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@grebyn.com \\ / / Then, the disclaimer: All expressed opinions are, indeed, opinions. \ / o Now for the witty part: I'm pink, therefore, I'm spam! \/