httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <>
Subject Re: Changing the ap_strerror prototype
Date Fri, 21 Apr 2000 16:26:46 GMT wrote:
> I lost the original thread (sorry).
> Rather then changing the ap_strerror prototype to take a buffer and a
> length, why don't we fix the actual problem and fix our memory allocation
> scheme?
> The problem was brought up with pools not being right when APR was first
> started.  At the time, Dean proposed a possible solution to the problem,
> using pools to implemented mallc/free, palloc, and shared memory
> palloc.
> Take a look through the archives, and lets stop fixing these things one at
> a time and fix it for good.  This scheme would allow us to pass in a
> single pool, and allocate memory correctly whenever we need it.

The problem is freeing. Either you create a new pool, explicitly free or
leak. None of those are preferable to passing a buffer and a length, in
many case. This is one of those cases, IMO. There's also the efficiency
thing, but that hardly applies to this particular function.




View raw message