Article View: comp.sys.atari.st
Article #40146Re: How much memory ?
From: Ray Wallace
Date: Tue, 09 Jan 1990 18:11
Date: Tue, 09 Jan 1990 18:11
15 lines
1091 bytes
1091 bytes
In article <790@kielo.uta.fi>, jackin@vehka.uta.fi (Markku M{enp{{) writes...
>I need to know how much memory I have for my program
Just keep malloc'ing the amount of memory returned by malloc(-1) untill you
run out of memory. If you sum the amount of memory malloc'ed then you'll know
the TOTAL amount of free memory (don't forget to then deallocate all the
memory if you are not going to use it). Back in October Allan Pratt posted a C
example of doing this, if you want the code let me know and I'll mail it or
post it.
---
Ray Wallace
(INTERNET,UUCP) wallace@oldtmr.enet.dec.com
(UUCP) ...!decwrl!oldtmr.enet!wallace
(INTERNET) wallace%oldtmr.enet@decwrl.dec.com
---
Technical Details
Message-ID:
<1411@engage.enet.dec.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!sun-barr!decwrl!shlump.nac.dec.com!engage.enet.dec.com!oldtmr!wallaceShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!sun-barr!decwrl!shlump.nac.dec.com!engage.enet.dec.com!oldtmr!wallace From: wallace@oldtmr.dec.com (Ray Wallace) Newsgroups: comp.sys.atari.st Subject: Re: How much memory ? Message-ID: <1411@engage.enet.dec.com> Date: 9 Jan 90 18:11:47 GMT Sender: news@engage.enet.dec.com Organization: Digital Equipment Corporation Lines: 15