Gisle Aas wrote:
Stas Bekman <[EMAIL PROTECTED]> 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:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to