Re[2]: [Gc] Calling GC_pthread_create' from a pthread key destructor

Ivan Maidanski ivmai at mail.ru
Thu May 5 23:50:07 PDT 2011


Hi.

If you compile gc without THREAD_LOCAL_ALLOC then your test won't crash. I'll try to find out why does this happen.

>Hi,
>
>Ivan Maidanski <ivmai at mail.ru> writes:
>
>>> pthread_setspecific (key, GC_STRDUP ("hello, world"));
>>
>> Just one note. Are you aware that this code is equivalent (since TLS is not traced by GC) to:
>>
>> (void)GC_STRDUP ("hello, world");
>> pthread_setspecific (key, <some_number>);
>
>Yes. The only point of this statement is to stress the GC and associate
>an initial value with the key (otherwise its destructor is never
>called.)
>
>Thanks,
>Ludo'.
>
>


More information about the Gc mailing list