Re: mod_perl large scalar cache

2001-01-11 Thread Doug MacEachern

On Wed, 3 Jan 2001, George Sanderson wrote:

 I have a mod_perl hash scalar that can store up to 4 MB of string data.
 
 I was wondering what happens to the memory usage after a "delete
 $myhash{large}"?

depends on your os and perl -V:usemymalloc
e.g. linux will "give it back to the os", but i think that depends on the
size.  most others will "give it back to the process", but perl malloc
will only "give it back to Perl".

 I was thinking (I know this can be dangerous:-), it would be nice if I
 could tell mod_perl to cache scalars that become larger than some specified
 value, so that they do not chew up too large chunks of memory.

you mean to not cache?  that idea has/is-being considered for 2.0, a
thread that combs interpreters not in use for things like this.
and/or looking into implementing 'use less memory' in Perl itself.




mod_perl large scalar cache

2001-01-03 Thread George Sanderson

I have a mod_perl hash scalar that can store up to 4 MB of string data.

I was wondering what happens to the memory usage after a "delete
$myhash{large}"?

I was thinking (I know this can be dangerous:-), it would be nice if I
could tell mod_perl to cache scalars that become larger than some specified
value, so that they do not chew up too large chunks of memory.