Re: Are g_try_malloc() and g_free() thread-safe?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>g_mem_set_vtable() doesn't really help (at least right now) because I
>can't get any definitive information on whether malloc() and free() are
>thread-safe.  I am building with -D_REENTRANT so the thread-safe

can i make a suggestion to you. try running find(1) on all your header
files and feed the results through grep looking for REENTRANT.

on my system (fedora core 1), there are *zero* occurences of this.

AFAIK, the thread-safe versions of malloc/free are part of the
pthreads library that is linked to your code. the _REENTRANT macro is
a stub thing that lives on in case one day there does need to be
something in the header files, but actually does nothing on any
(most?) current linux systems.

--p
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux