On Friday 19 October 2001 09:17 am, Aaron Bannert wrote:
> On Fri, Oct 19, 2001 at 05:18:03AM -0700, Greg Stein wrote:
> > I brought this up once before. I think it was Aaron that suggested an
> > "optimization" which changed a pcalloc to a palloc. I noted that doing
> > things like that are troublesome for long term maintenance.
>
> I brought it up once, but my proposed change was never committed.
>
> > Bam. Empirical evidence here.
> >
> > Changing pcalloc to palloc should only be done when we have specific
> > information that it is *really* helpful.
>
> I agree that in general we probably don't want to go around replacing
> these things everywhere, but in some cases (like inside a tight loop
> in a filter that gets called many times during a single request) it may
> make sense. But that's why we have two ways to allocate memory, right?

As it happens, I agree with everybody.  Replacing apr_pcalloc with apr_palloc
is asking for trouble, and we shouldn't just grep through the server replacing
all of them.  However, in select places, it does make sense.  Before replacing
pcalloc with palloc, should only be done with care, but it should be done
if it makes sense.

Ryan

______________________________________________________________
Ryan Bloom                              [EMAIL PROTECTED]
Covalent Technologies                   [EMAIL PROTECTED]
--------------------------------------------------------------

Reply via email to