glib dependency for the X Server

Eric Anholt eric at anholt.net
Sun Apr 2 17:49:22 PDT 2006


My next step for EXA I think is to integrate the memory manager work.  I
think I've figured out that I'll be doing it without breaking ABI, but
with the ability for drivers aware of the new version to plug in their
own memory manager if they want (creating the possibility for AGP+FB
combo memory managers, or DRI-backed memory managers, etc.).

However, one thing I ran into while writing the couple of new memory
managers was that I was sick and tired of writing my own linked lists or
other data structures.  I was just going to pull in a pared-down queue.h
from FreeBSD and use those macros, but I find them a little unwieldy,
and I bet non-BSDers don't have nicer opinions of them.  Plus I was
pulling in a skip-list library I found online and fixing bugs in it.
This seemed dumb.

So, I intend to make the X Server link to glib, and use data structures
from there.  While glib is a new dependency, it's not *that* large (<
380k on my amd64), it's LGPL (so it doesn't affect the ability to ship
closed X Servers), and probably everybody has it installed already.  The
advantage is that having glib for datastructures means our code should
be more reliable[1], readable, and faster to develop because you don't
have to re-write some datastructures everywhere you use them.  It could
also be used relatively quickly, I suspect, to push a lot of OS
dependencies off to being someone else's responsibility.

Talking individually with people, I've had a good response to this (and
it wasn't originally my idea, anyway).  I'm posting this here to make it
not be a shock when it happens, and give an opportunity for showstopper
issues with this plan to be brought up.

[1] We've had to fix several dumb issues with linked-list handling in
the memory manager already.

-- 
Eric Anholt                     anholt at FreeBSD.org
eric at anholt.net                 eric.anholt at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg/attachments/20060402/a4f971cc/attachment.pgp>


More information about the xorg mailing list