Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Jul 1995 10:08:56 -0600
From:      Warner Losh <imp@village.org>
To:        paul@FreeBSD.org
Cc:        rsnow@legend.txdirect.net, FreeBSD-current@FreeBSD.org
Subject:   Re: XFree86 and swap 
Message-ID:  <199507171608.KAA06371@rover.village.org>
In-Reply-To: Your message of Mon, 17 Jul 1995 11:36:07 BST

next in thread | raw e-mail | index | archive | help
: I seem to remember that our malloc was pretty stupid about freeing up memory
: but do you mean the X server never gives back the memory it grabs? If so,
: what's the reasoning? 
: 
: When you're running lots of X clients, like netsape and xv then you're
: going to use a LOT of memory in one go and if the X server never gives it
: back you're in trouble.

Most of the older X servers will not give memory back to the system,
or are ineffective in doing so.  This is especially true when you have
boatloads of pixmaps that are of strange sizes (larger than 16x16 or
so).  At least that is what I've seen in using the X server on my
FreeBSD box over the last couple of releases of XFree86.  They may
have corrected this problem more recently.

: > 
: > Also, netscape (at least in some versions) eats huge amounts of server
: > resources by creating largish pixmaps.  At least that's what I've seen
: > here with 1.0N.  Purhaps that is your problem?
: 
: Well, netscape seems to be the cause but I'm not sure it's the problem since
: I'd expect the memory to be freed when I kill it.

Hmm, if I'm a client, then I allocated 10M in the server for pixmaps,
then someone else needs to allocate n bytes, and then I free the 10M,
then the X server will still appear to be using that 10M of memory,
even though it has internally marked it as free.  I think that's what
you are seeing.  I know that OI apps did this from time to time.  It
is also possible, though unlikely, that there is some resource
allocation that isn't completely free'd when you are done with it in
the X server.  For an R3-R4 server, this is likely.  For newer ones
(like R6), it is much less likely because Purify and other memory
tools hit the streets long enough ago to make an impact in these
areas.

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199507171608.KAA06371>