Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!news.cs.indiana.edu!msi.umn.edu!math.fu-berlin.de!tmpmbx!netmbx!weis From: weis@netmbx.UUCP (Dietmar Weis) Newsgroups: comp.unix.ultrix Subject: free(2) doesn't give free -- what ?? Message-ID: <2294@netmbx.UUCP> Date: 28 Apr 91 15:41:20 GMT Distribution: world Organization: netmbx, Berlin, Germany Lines: 28 Free(2) frees memory in a running process, but no other process can use it then. We have seen this with vmstat(8) and a test program which [cm]allocs in 1K steps and frees in 1K steps: Allocating memory increases the avm column and decreases the fre column. -ok- Freeing memory decreases avm but does NOT increase fre. -not ok- This is fatal I would say, because we have a process which allocates 7 MB (don't ask me why) and then frees them later on. But this doesn't succeed. Four such processes and system perfomance goes down because of paging and swapping. Or is free(2) designed to free memory on terminating the process? What is the algorithm, what is the clue ? Thank you very much Dietmar -- weis@netmbx.UUCP | Dietmar Weis DONOP CONSULT GmbH Voice: 030/884 28 54-0 | Uhlandstrasse 179/180 Fax: 030/882 55 29 | D - 1000 Berlin 12