[Xcb] Invalid XIDs
Nathaniel Smith
njs at pobox.com
Mon Jan 26 00:08:58 PST 2009
On Sun, Jan 25, 2009 at 10:30 PM, Barton C Massey <bart at cs.pdx.edu> wrote:
> My guess was that GetXIDList would go back and scavenge XIDs
> you'd freed, but I'd have to check the server to be sure.
> GetXIDRange couldn't really sensibly do that, or if it did
> you'd be calling it a *lot*...
According to the spec, the whole rationale for having XC-MISC is that
the server can scavenge XIDs that have been freed (while Xlib would
have to maintain a prohibitive amount of state to do so client-side).
And the server code does seem to do something like that (in that it
does *some* sort of loop over the clients allocated resources; that
function is particularly obscure, though).
Certainly if your XID space becomes sufficiently dense and fragmented,
GetXIDRange will become less efficient than GetXIDList, but at that
point things are probably falling apart anyway... while debugging I
tried to introduce that case synthetically by allocating millions of
close-but-not-adjacent pixmaps, and the server just started refusing
to allocate anything well before I ran low on XIDs.
-- Nathaniel
More information about the Xcb
mailing list