home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / programm / 5349 < prev    next >
Encoding:
Internet Message Format  |  1992-11-18  |  1.2 KB

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