This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

memory leak with thread


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;
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]