[Pixman] static TLS is a scarce resource
ajax at redhat.com
Tue Jun 25 20:30:24 UTC 2019
On Fri, 2019-06-21 at 17:07 +0200, Simon Richter wrote:
> On Fri, Jun 21, 2019 at 04:44:08PM +0200, Dan Horák wrote:
> > Is there anything pixman could do to lower its
> > consumption of TLS? Because it's only a matter of time when the "static
> > TLS allocation" error will appear again in another complex application.
> TLS accesses are also very slow on some platforms. It is meant to store a
> pointer to a per-thread singleton containing the actual data, so that would
> use 4 or 8 bytes per module that uses TLS.
Yeah, this particular use of TLS looks like it could be a single
thread-local pointer to a (thread-allocated) cache_t. The only problem
with that would be cleaning up on thread exit?
More information about the Pixman