|Keep It Simple, Stupid|
I am using perl v5.12.2, threads v1.75, threads::shared v1.32.
It might be worth your while trying threads v1.81 & threads::shared v1.34.
As others replied this could be an underlying problem with pthread.
*nix/pthreads isn't something I know much about, but my gut feel is this is more likely to be a problem with (perl) memory allocation than the underlying threading libraries.
One thing that should be done, if this is going to get fixed, is to find a minimal test case that demonstrates the problem and a bug report raised. Something like:
Assuming that actually leaks on your system, because the memory usage is rock solid at 12.5MB here.
For now I'll rewrite the code to reuse threads.
Once you do, you'll never go back to using throw-away threads.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.