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)

Nicholas Clark

Reply via email to