home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cis.ohio-state.edu!ucbvax!sequent.cc.hull.ac.uk!S.Marshall
- From: S.Marshall@sequent.cc.hull.ac.uk (Simon Marshall)
- Newsgroups: comp.unix.questions
- Subject: Does free() really free?
- Message-ID: <9209051620.AA02618@ucbvax.Berkeley.EDU>
- Date: 5 Sep 92 17:17:25 GMT
- Sender: daemon@ucbvax.BERKELEY.EDU
- Lines: 27
-
- Or: How do I find out the real size of a running process?
-
- Hi all. This is really a question about the Sequent's shfree(), but
- in tests it seems to apply to other machines and free() in general.
- Please can anyone give a knowledgable answer?
-
- If I malloc(), then free(), the SZ (SIZE) column of ps does not show
- the expected fall. I don't believe that the system ignores freed space,
- but then again I know that software that I have written thrashes
- machines, despite the fact that most of the memory malloc()ed is
- subsequently free()ed.
-
- On our Sequent and Suns, for example, once the SZ column shows
- 70Meg+, you can see the machines thrash. But I can work out that the
- actual unfreed memory only amounts to at most 15Meg.
-
- So, please could anyone tell me what is going on here? Does free()
- actually free, and is the SZ column of ps reliable in any way? Or is
- free() working as expected, ps lying, but 15Meg is too much? Surely
- not?! I'd welcome anything emailed/posted. (Except unhelpful questions
- of the order `why are you mallocing then freeing so much' etc. :-)
-
- Thanks in advance, Simon.
- _______________________________________________________________________________
- Simon Marshall, Dept. of Computer Science, University of Hull, Hull HU6 7RX, UK
- "Football isn't about life and death. It's more important than that." Bill
- Email: S.Marshall@Hull.ac.uk Phone: +44 482 465181 Fax: 466666 Shankley
-