home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!ub!acsu.buffalo.edu!sivap-s
- From: sivap-s@acsu.buffalo.edu (Suresh .S)
- Newsgroups: comp.unix.programmer
- Subject: Re: heap status
- Message-ID: <BxyA2n.1IG@acsu.buffalo.edu>
- Date: 19 Nov 92 06:30:22 GMT
- References: <1992Nov4.192354.13351@cs.umb.edu>
- Sender: nntp@acsu.buffalo.edu
- Organization: UB
- Lines: 20
- Nntp-Posting-Host: talos.cs.buffalo.edu
- X-Newsreader: TIN [version 1.1 PL6]
-
- ChianHwa Yang (star@ra.cs.umb.edu) wrote:
- :
- :
- : Fellow C programmers,
- :
- : I'm trying to find out how much dynamic heap storage my program
- : is taking during its run. The only command I know of that does this is
- : ps -aux (on bsd). However, I think it only displays the data and text
- : space because the value does not change even though the program frees
- : a lot of space. Does anyone out there have an idea? Any C library function,
- : system call, or unix commands?
-
- In UNIX we have a system call mallinfo(), which will tell you how much
- of dynamic memory you have consumed, provided you have malloced at
- least once.
-
- --
- Suresh Sivaprakasam
- Department of Computer Science, SUNY Buffalo, Amherst, NY - 14260-0001
- Internet :sivap-s@cs.Buffalo.EDU Bitnet : sivap-s@SUNYBCS.BITNET
-