perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: [Fwd: [PATCH] libperl leaks a THREAD_KEY each time it is reloaded]
Date Wed, 05 Jan 2005 19:09:52 GMT
Gisle Aas wrote:
> Stas Bekman <stas@stason.org> writes:
> 
> 
>>How do I check the limit for pthread_key_create on linux?
> 
> 
> On my Gentoo box I find the limit here:
> 
>      $ grep PTHREAD_KEYS_MAX /usr/include/bits/local_lim.h
>      #define PTHREAD_KEYS_MAX        1024
> 
> 
>>Is there a way to check that dynamically (i.e. how much is already
>>used)? I'll try to reproduce it.
> 
> 
> /* Something like this perhaps? */
> #include <stdio.h>
> #include <pthread.h>
> 
> int
> main(int argc, char* argv[])
> {
>     pthread_key_t key;
>     int i = 0;
>     while (pthread_key_create(&key, 0) == 0)
>         i++;
>     printf("%d\n", i);
> }
> 
> 
>>I suppose modperl could provide a workaround for older perls, based on
>>your patch?
> 
> 
> Yes, you can just drop in the perl_fini functions into mod_perl itself.

Thanks Gisle, I'll work on reproducing it and then patch modperl and 
report back. I'd also need to know which perl has it fixed. I'll monitor 
p5p for that.

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message