[Xcb] [PATCH 1/2] Don't declare xcb_req as static

Keith Packard keithp at keithp.com
Wed Jun 28 17:28:26 UTC 2017


Eric Anholt <eric at anholt.net> writes:

> Increasing the executed-code size by 4% here makes me nervous

Overall memory usage in the system will be less as you get rid of the
data segment duplication in every process.

> Is the problem just the relocations in that data?

Yes, even if the xcb_extension_t is also const, you've got a relocation
to deal with.

> Would pulling the req->ext out of xcb_protocol_request and passing it
> as another parameter of a new xcb_send_request variant also fix it,
> while letting us keep the remainder of the xcb_protocol_request_t
> static?

Yes, it looks like that should work. I note that there's also a global
mutex lock for every extension request which would be nice to eliminate
at some point :-)

-- 
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/xcb/attachments/20170628/02a38617/attachment.sig>


More information about the Xcb mailing list