[Xcb] How come there is no xcb_free_id()?
Bart Massey
bart at cs.pdx.edu
Wed Mar 20 09:47:55 PDT 2013
Not sure what you're asking here. A long-running X client that
consumes a lot of xids will eventually run out of the ones initially
allocated to it by the server. At that point, it needs to either
reclaim some of the ones it allocated previously that are no longer
valid on the server side, or get a fresh allocation. There are at most
500M possible XIDs, so it is conceivable on a busy X server that it
would eventually run out if it just kept handing fresh blocks to
applications all the time without trying to reclaim them. So...yeah.
--Bart
On Wed, Mar 20, 2013 at 9:11 AM, Christ-Jan Wijtmans
<cj.wijtmans at gmail.com> wrote:
> why spend extra cycles to detect an "unused one"?
>
>
> On Wed, Mar 20, 2013 at 9:22 AM, Bart Massey <bart at cs.pdx.edu> wrote:
>> I assume you mean xcb_free_xid()? It's not needed. xcb_generate_xid()
>> will always hand you a fresh one; if it runs out, it will ask the
>> server (via the xc_misc extension) for some unused ones to hand out in
>> the future. In general, folks just plow through xids fairly
>> indiscriminately, since they're cheap. --Bart
>>
>> On Tue, Mar 19, 2013 at 5:41 PM, medusade <medusade at cox.net> wrote:
>>> Xcb, How come there is no xcb_free_id()?
>>> medusade
>>>
>>>
>>> _______________________________________________
>>> Xcb mailing list
>>> Xcb at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/xcb
>> _______________________________________________
>> Xcb mailing list
>> Xcb at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/xcb
> _______________________________________________
> Xcb mailing list
> Xcb at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xcb
More information about the Xcb
mailing list