[Gc] Thread Local Storage?

The Devils Jester thedevilsjester at gmail.com
Thu Oct 17 21:20:01 PDT 2013


I have a couple of stl containers that hold pointers to classes which
inherit from gc.  The containers are created via a template that includes
the gc_allocator.  This has worked great for quite awhile, however I have
recently made a couple of the containers thread local using __thread.  When
I do this, however, (while still in my main thread and never having created
a new thread), at some arbitrary point (maybe when GC kicks in?) my
container size goes from whatever it was, to zero.


I can remove the __thread from the containers and everything works as
desired, for an indefinite period of time, but adding __thread back in,
always causes the same issue.  Is there some special initialization I need
to do to allow for __thread (and similar) to work correctly in the GC?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://napali.hpl.hp.com/pipermail/gc/attachments/20131017/453cb7d3/attachment.htm


More information about the Gc mailing list