Path: utzoo!attcan!uunet!husc6!bu.edu!buengc!bph From: bph@buengc.BU.EDU (Blair P. Houghton) Newsgroups: comp.unix.ultrix Subject: Re: Memory ``leaks'' in DEC servers Message-ID: <5467@buengc.BU.EDU> Date: 8 Mar 90 15:00:25 GMT References: <2973@bacchus.dec.com> Reply-To: bph@buengc.bu.edu (Blair P. Houghton) Followup-To: comp.unix.ultrix Organization: Boston Univ. Col. of Eng. Lines: 24 In article rusty@garnet.berkeley.edu (rusty wright) writes: >In article <2973@bacchus.dec.com> joel@pandora.pa.dec.com (Joel McCormack) writes: > (1) There is no way to give memory back to the kernel once it is > allocated. So killing off all of your applications will not reduce the > total amount of memory consumed by the server. It should reduce the > amount of memory needed to be resident. > >This isn't true, a program can give memory back to the kernel once it >is allocated; do "man brk". While it is true that you can use brk(addr) to return data space to the system, you have to be sure that you don't need anything above addr before you do it. Joel said he didn't know of any X servers that do garbage collection and compaction, so what you end up with are long stretches of mostly free memory with a few valid bytes hanging around. You can only brk() back down to the highest of these. The question is, why aren't there any garbage collectors in X servers? --Blair "Dare I crosspost to comp.windows.x? No, I durn't..."