Thread Local Storage?
The Devils Jester <[email protected]>
| Newsgroups | gmane.comp.programming.garbage-collection.boehmgc |
|---|---|
| Message-ID | <CAP9jBPghRQDcqgROk9rcDgB+tUcuSfO+q1ys9S_x=fnORHxEUQ@mail.gmail.com> |
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? _______________________________________________ Gc mailing list Gc-V9/[email protected] http://www.hpl.hp.com/hosted/linux/mail-archives/gc/