On Mon, 30 Oct 2000, Matt Sergeant wrote:
> On Mon, 30 Oct 2000, Todd Finney wrote:
> > I'm concerned about putting large amounts of data into 
> > $r->notes.  Some of our script output can be pretty 
> > heavy.  If $r->notes can only take simple strings, how 
> > large of a simple string is it safe to put in it?  Is there 
> > a better way to do this?
> AxKit uses the notes table to store interim strings for template
> processing. I've not yet heard a bug related to it, but then I'm not
> delivering massive files. I'd imagine it would probably be limited by
> available memory.

This is basically correct. The notes table is tied to Apache::Table, which
in itself is an ap_table, (with C accessors of ap_table_get() and
ap_table_set()). Like everything else in Apache, it is based on the pools
system of memory management, which will quite happily allocate up to the
amount of memory you have, and will then throw it away at the end of the
request.

However, apache itself calls malloc() but never calls free(), because once
it has allocated the memory, it manages it itself. Given that the notes
table is allocated from the request pool (such that it is thrown away at
the end of a request). It will always happen in the child and can never be
shared - so if you have large numbers of apache processes, then this might
(if you're using a lot of memory) be able to take the machine down.

But the memory management system in apache is only limited by the amount
of memory that the system will let it allocate - which means that you
should be OK.

MBM

-- 
Matthew Byng-Maddick   Home: <[EMAIL PROTECTED]>  +44 20  8981 8633  (Home)
http://colondot.net/   Work: <[EMAIL PROTECTED]> +44 7956 613942  (Mobile)
        "It's today!" said Piglet.
        "My favourite day," said Pooh.


Reply via email to