Breaking the X module ABI in 7.0 ?

Roland Mainz roland.mainz at nrubsig.org
Tue Apr 12 03:29:06 EST 2005


Adam Jackson wrote:
> > 2. Would it be possible to break the existing ABI and start from scratch
> > with a new one ?
> 
> Many things are possible.  I doubt reinventing this particular wheel would be
> a good use of our time.

When will Xorg then deal with this kind of issues ? In 7.1, 7.2, 8.0 or
never ?

I have another example where this starts to hurt: Memory fragmentation.
Currently the number one problem for long-running Xservers or Xservers
running in memory-restricted environments such as Xterminal/Thin clients
is memory fragmentation. Where does this fragmentation come from ? The
primary source of this problem are pixmap allocations (well, teaching
the GTK+ toolkit or Mozilla not to abuse pixmaps for obscure things such
as double-buffering (ignoring the detail that there are the
DOUBLE-BUFFER and MultiBuffer extensions) is likely not an option... ;-(
).
Unfortunately the issue cannot be solved properly right now as the
symetry of allocation/deallocation is broken - there is an
|AllocPixmap()| function but no |FreePixmap()| counterpart. This leads
directly to the problem that the default allocator for pixmaps cannot be
replaced - only single drivers can do that. The proposal would be to use
a better memory allocator system - but that would require to replace the
pixmap deallocation currently done with |xfree()| with a |FreePixmap()|
function to have a better control here.
That can only be properly implemented (and yes, I have researched the
alternatives for around a week now after looking into the ways how Sun
solved the problem for their Xsun server) with breaking the ABI (well,
you do not break the ABI directly, just all drivers would have to call
|FreePixmap()| instead of |xfree()| to dispose pixmaps) ... the
alternative (well, it's no real alternative, it's just the way how it
currently happens) would to ignore the fragmentation problem and let the
Xserver crash (er... I am just thinking about the Xterminal case right
now... normal workstation users would likely only see the permanent
growing of the memory consumed by the Xserver process) from time to time
once it is unable to allocate larger memory blocks because all the heap
is trashed.

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)


More information about the xorg-arch mailing list