Re: aiops.c and xmalloc

From: Adrian Chadd <adrian@dont-contact.us>
Date: Thu, 5 Oct 2000 20:02:47 +0800

On Thu, Oct 05, 2000, Andres Kroonmaa wrote:
> On 5 Oct 2000, at 6:27, Adrian Chadd <adrian@creative.net.au> wrote:
>
> > > Of the 4 xmalloc calls there is in aiops, only one is easily
> > > transferrable to memory pools.. (the struct stat one).
> >
> > If the above is what I think it is, assert the string length and use
> > a short string. Perhaps a PATH mempool should be created for this
> > kind of use?
>
> We have string pools that take size parameter for both alloc and free.
> We could use these pools?
> What is general view, should we create a pool for each alloc kind, or
> should we try to keep pool count low and reuse pools if alloc sizes
> match well?

Its not the sizes that determine whether it should be reused. Its the use.
If there was a generic set of strings mempools then yes, use them in all
the modules.

As I said before, the aiops code could benefit from being more tightly
integrated into squid itself and not be 'separated' like it seems to be
right now.

I'll comment about your patch in a second reply.

Adrian

-- 
Adrian Chadd			"If a butterfly flaps its wings in China,
<adrian@creative.net.au>	    will a woman get naked in Amsterdam?"
				      -- Ashley Penney on Chaos Theory
Received on Thu Oct 05 2000 - 06:03:00 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:41 MST