Memory ``leaks'' in DEC servers

Blair P. Houghton bph at buengc.BU.EDU
Fri Mar 9 01:00:25 AEST 1990


In article <RUSTY.90Mar7105635 at garnet.berkeley.edu> rusty at garnet.berkeley.edu (rusty wright) writes:
>In article <2973 at bacchus.dec.com> joel at 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..."



More information about the Comp.unix.ultrix mailing list