perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Lackhoff <>
Subject Re: Reducing memory usage using fewer cgi programs
Date Sat, 25 Oct 2008 03:59:25 GMT
On 24.10.2008 15:03 Michael Peters wrote:

> This is only true if those structures were created during run time and go out of scope
at run time. 
> If they are generated at compile time or attached to global variables or package level
> they will not be re-used by Perl.

Wait a minute, I would like to do exactly that: use a config module in that loads some massive config hashes in the hope that the
memory they use will be shared:

package MyConfig;
our $aHugeConfigHash = load_data_from_config_file();

then in my mod_perl module:
my $conf = $MyConfig::aHugeConfigHash;

(well sort of, it is actually wrapped in an accessor but that gets its
data from the package variable)

Are you saying, I cannot share the memory this way? And if so, is there
an alternative?


View raw message