Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C Moderated > Re: Is malloc()...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 8 of 8 Topic 1085 of 1133
Post > Topic >>

Re: Is malloc() function provided in <stdlib.h> thread-safe?

by Andrei Voropaev <avorop@[EMAIL PROTECTED] > May 5, 2008 at 04:01 PM

On 2008-04-21, climber.cui@[EMAIL PROTECTED]
 <climber.cui@[EMAIL PROTECTED]
> wrote:
>   Does anyone have experience on the thread-safty issue with malloc()?
> Some people said this function provided in stdlib.h is not thread-
> safe, but someone said it is thread safe.  Is it possible this
> function evolves from thread-unsafe to thread-safe in recent years?
> How could i find out?
>   I am using the C library coming with GNU linux distribution.

Hm. malloc() is not provided in stdlib.h, it is declared there. In fact
one can provide his own malloc implementation that will be used in place
of the one provided in libc.

The POSIX standart requires that malloc is thread-safe. So malloc
provided in glibc on Linux is thread-safe.


-- 
Minds, like parachutes, function best when open
-- 
comp.lang.c.moderated - moderation address: clcm@[EMAIL PROTECTED]
 -- you must
have an appropriate newsgroups line in your header for your mail to be
seen,
or the newsgroup name in square brackets in the subject line.  Sorry.
 




 8 Posts in Topic:
Is malloc() function provided in thread-safe?
climber.cui@[EMAIL PROTEC  2008-04-21 13:20:27 
Re: Is malloc() function provided in thread-safe?
Thomas Richter <thor@[  2008-05-05 16:00:54 
Re: Is malloc() function provided in thread-safe?
Kenneth Brody <kenbrod  2008-05-05 16:00:57 
Re: Is malloc() function provided in thread-safe?
gordonb.cp95r@[EMAIL PROT  2008-05-05 16:01:01 
Re: Is malloc() function provided in thread-safe?
Barry Schwarz <schwarz  2008-05-05 16:01:08 
Re: Is malloc() function provided in thread-safe?
=?utf-8?Q?Dag-Erling_Sm=C  2008-05-05 16:01:20 
Re: Is malloc() function provided in thread-safe?
Kalle Olavi Niemitalo <  2008-05-05 16:01:22 
Re: Is malloc() function provided in thread-safe?
Andrei Voropaev <avoro  2008-05-05 16:01:28 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 2:31:58 CDT 2008.