pthread_detach doesn't release memory
psteele at maxiscale.com
Wed May 20 18:56:29 UTC 2009
I create a thread using something like this:
pthread_create(&thread, NULL, mythread, NULL);
I use the detach because I want to make sure the thread's resource are reclaimed when the thread completes. However, this does not seem to work. Each time I create a thread the application's memory footprint grows by 128 bytes and this memory is never released.
Am I doing this right?
More information about the freebsd-questions