X Server: abused or buggy?
glynn at gclements.plus.com
Wed Dec 10 12:12:19 PST 2008
Alan Coopersmith wrote:
> > However, let us not dismiss this POV too soon. It is usually argued that
> > an application that suffers from such memory fragmentation should be
> > restarted occasionally (and, given that the Xserver runs in user space,
> > unlike in Windoze, this is not impossible, though perhaps inconvenient in
> > some circumstances).
> We could also investigate using a "slab allocator" approach for things like
> data structures that are a fixed size, to keep them from ending up between
> pixmaps, and hopefully reducing fragmentation that way, but that's also more
> work no one has signed up for.
And it's unlikely to be worth the effort.
Complaints about the server's memory usage tend to begin and end with
pixmaps (I suppose that e.g. OpenGL display lists could consume
similar amounts of memory, but that's likely to be a far less common
case than pixmaps).
If you want to avoid the situation where large amounts of memory are
allocated for pixmaps, then can't be freed due to other data sharing
the same memory, you're likely to be better off controlling the
allocation of the pixmaps than trying to control everything else.
A more fruitful solution would probably be to use a compacting
(relocating) allocator for pixmaps (at least for pixel data;
housekeeping structures don't really matter).
Glynn Clements <glynn at gclements.plus.com>
More information about the xorg