malloc and threads

Wolfram Gloger Wolfram.Gloger@dent.med.uni-muenchen.de
Tue Nov 26 09:19:00 GMT 2002


Hi,

> A program that simply launches 10 threads that just malloc, wait 100
> milliseconds, and free the data and then loop.  

Please post the code!

> This simple program segmentation faults. I'm using glibc version 2.2.2. I
> was wondering if malloc **still** has reentrancy problems or not ? 

malloc never was reentrant and probably never will be.

If you mean "thread-safe", I'm not aware of any thread-related
problems in malloc, in particular not anything that would cause the
program described above to fail.  That also holds for glicbc-2.2.2,
even though that's _really_ old now.

Regards,
Wolfram.



More information about the Libc-alpha mailing list