[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Operators 'new', 'delete' and thread safety.
From: |
ddtl |
Subject: |
Re: Operators 'new', 'delete' and thread safety. |
Date: |
Tue, 17 Apr 2007 17:50:37 +0300 |
On Tue, 17 Apr 2007 06:56:42 -0700, Paul Pluzhnikov
<ppluzhnikov-nsp@charter.net> wrote:
>ddtl <this@is.invalid> 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
- Operators 'new', 'delete' and thread safety., ddtl, 2007/04/17
- Re: Operators 'new', 'delete' and thread safety., ddtl, 2007/04/17
- Re: Operators 'new', 'delete' and thread safety., Paul Pluzhnikov, 2007/04/17
- Re: Operators 'new', 'delete' and thread safety.,
ddtl <=
- Re: Operators 'new', 'delete' and thread safety., Brian Mckinnon, 2007/04/18
- Re: Operators 'new', 'delete' and thread safety., Bernd Strieder, 2007/04/18
- Re: Operators 'new', 'delete' and thread safety., Paul Pluzhnikov, 2007/04/18
- Re: Operators 'new', 'delete' and thread safety., Brian Mckinnon, 2007/04/18
- Re: Operators 'new', 'delete' and thread safety., karsten, 2007/04/23