Breaking the X module ABI in 7.0 ?

Adam Jackson ajax at nwnk.net
Tue Apr 12 03:49:07 EST 2005


On Monday 11 April 2005 13:29, Roland Mainz wrote:
> 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 ?

What kinds of issues?

There's a difference between breaking ABIs (which happens when you remove 
functions and variables from the view of the loadable modules) and starting 
from scratch.  We can do the first one; we _really_ don't want to do the 
second one, do we?

> 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) ...

That's only an ABI break if you change the behaviour of AllocPixmap().  The 
better thing to do is to create a new entrypoint named AllocPixmap2() that 
has a proper destructor and convert the drivers to use that.  Old drivers 
will work the old way and continue to be leaky.

I'm not saying that the issue you described is not a bug, just that we don't 
necessarily need to break the ABI to fix it.  You only need to break the ABI 
if you want to ensure that old drivers no longer work.

- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.x.org/archives/xorg-arch/attachments/20050411/0fd06cfe/attachment.pgp


More information about the xorg-arch mailing list