On Tue, 17 Apr 2007 06:56:42 -0700, Paul Pluzhnikov <[EMAIL PROTECTED]> wrote:
>ddtl <[EMAIL PROTECTED]> writes: > >> Is it safe to use operators 'new' and 'delete' in a multithreaded >> programs, that is: are those operators thread-safe in a current >> implementation of g++? > >Yes, on all platforms where malloc is thread-safe. In practice >that's "all platforms that support threads" in general, and all >Linux/glibc versions since 1996. > >> If yes, is it documented somewhere? > >Probably, but I do not have any references for this. > Thanks for your answer. Do you know maybe where it is documented that malloc is thread-safe, then (on Linux/glibc)? I have heard a claim that if it is not documented in glibc's manual that a function is thread-safe, then it is not thread-safe, and it is not written there that malloc is thread-safe (though actually no other function either is documented to be thread-safe), and C standard doesn't demand that standard library should be thread-safe. ddtl _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus