gthread memory allocation error

Thiago Macieira thiago at
Sun Nov 2 23:49:46 PST 2008

knightmanish wrote:
>//frees the array position to be used by another thread
>//frees the memory
>GThread* thread = ?g_thread_self();
>return NULL;
>Am I missing some memory freeing function to be called OR something

I believe you'll have to ask a glib mailing list about the code sections 
above. I don't know glib, but most other thread implementations I know 
won't let you delete the thread object while the thread is running, much 
less from inside the thread.

Also note that your free_array should be volatile. You're accessing it 
from two different threads without a lock.

  Thiago Macieira  -  thiago (AT) - thiago (AT)
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : 

More information about the dbus mailing list