Nicholas Clark <[EMAIL PROTECTED]> writes:
>Would it make sense to replace the hardwired 2048 file descriptor reference
>count array (used in perlio.c, defined in perlvars.h)
>
>PERLVARA(Gperlio_fd_refcnt, 2048, int) /* PERLIO_MAX_REFCOUNTABLE_FD */
>
>with 2 global variables (both protected by the PerlIO_mutex),
>one a pointer to a dynamically allocated array, the other its length?
>
>This would seem more flexible than the current arrangement, and would probably
>use less memory in the general case.
>
>
>For the various configurations of perl, are global variables always global to
>perl${exe} ? Or can they end up in a shared library and hence have to stay the
>same size to maintain binary compatibility?


>(I'm looking at 8k of fd reference count array in every perl process ever
>started and wondering if it might go on a diet)

I have a feeling that is why it is a static array.
IIRC this has to be shared amongst all the threads and 
at the time I wrote it there was not a reliable way to "malloc" things
globally.


>
>Nicholas Clark

Reply via email to