This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
memory leak with thread
- To: help-gcc at gnu dot org
- Subject: memory leak with thread
- From: Moritz Julen <moju at hotmail dot com>
- Date: Thu, 16 Dec 1999 18:27:14 +0000
- Newsgroups: gnu.gcc.help
- Xref: wodc7nx0 gnu.gcc.help:2225
hello
when I create a thread and then exit it, I have a memory leak of
8160KB...
I do this:
void * ThreadInterface(void * ptrVoid)
{
// set the real time signal handler
signal(SIGALRM, TimeoutHandler);
cout<<"!!end thread interface!!\n";
pthread_exit(0);
}
int main(void)
{
pthread_t thInterface;
pthread_attr_t thattrInterface;
pthread_attr_init( (pthread_attr_t *)&thattrInterface);
pthread_create(&thInterface, (pthread_attr_t *)&thattrInterface,
&ThreadInterface, NULL);
pthread_join(thInterface, NULL);
return EXIT_SUCCESS;
}