[Xcb] Query: is Xcb zeroing out unused fields in requests?

Jamey Sharp jamey at minilop.net
Mon Nov 8 11:41:40 PST 2004


On Sun, Nov 07, 2004 at 07:47:57PM -0500, Jim Gettys wrote:
> If not, it should: the data stream will compress better...

It zeroes up to three padding bytes at the end of each part of the
request (the fixed-length part, and any variable-length lists on the
end). It has to, or incorrect behavior results for some requests. (I
think QueryTextExtents is one.)

Do you have measurements that support this claim? I'm having a little
trouble believing there's much impact.

I suppose we can memset the fixed-length request buffer to 0 on the
stack before filling it in; alternately, we can generate code to zero
explicitly-specified padding bytes. Both solutions bother me a little.
-- 
Jamey Sharp <jamey at minilop.net> - http://minilop.net/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://freedesktop.org/pipermail/xcb/attachments/20041108/6027585d/attachment.pgp


More information about the xcb mailing list