Problem in new/delete in multithreaded app

DUHRA, SARABJEET (HP-Cupertino, ex1) sarabjeet_duhra@am.exch.hp.com
Mon Sep 4 16:53:00 GMT 2000


Hi ,
	I am using gcc version 2.9-hppa-991112 running on HPUX 11.00
9000/820 .
I am running a simple program which starts 100 threads ( using pthreads) 
and then each thread calls new/delete in a for loop.

This program dumps core after running for a minute.
If i modify the program to use  malloc/free , it runs fine.

My question is : is new/delete thread-safe on gcc?.

I am attaching the program.


regards
sarab


 <<main.cpp>> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.cpp
Type: text/x-c
Size: 572 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20000904/ebcfbc21/attachment.bin>


More information about the Gcc-bugs mailing list