Pthread_create and memory issues.
Daniel Eischen
eischen at vigrid.com
Sat May 22 13:57:20 PDT 2004
On Sat, 22 May 2004, Cole wrote:
> Hi
>
> Ok this is just a more direct question that the thread Memory Leak.
>
> I have a program using pthread_create, and it runs fine, no compile errors
> or warnings, it all works fine, not a single issue, but it very very slowly
> uses up memory. The program creates a fixed number of threads, and after
> each one has run to completion it stores them for a while for use again if
> needed soon, else it destroys them after a specified amount of time.
The threads library (at least libpthread) caches threads and
KSE/KSEGs for re-use.
Threads also have to be detached (or joined to) in order to
reclaim their space.
--
Dan Eischen
More information about the freebsd-hackers
mailing list