[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Fix memory leak like situation when parsing a svn_config_t object repeatedly

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2005-07-28 02:02:51 CEST

Bernd Rinn wrote:
> Greg Hudson wrote:
>
>>Committed with minor adjustments in r15436 and r15437.
>>
>>While reviewing the patch, it occurred to me that the enumeration
>>callbacks should also take a pool parameter, which would be an iteration
>>subpool of the pool passed to the enumeration functions.
[...]
> I agree. Please find attached my suggestion of a patch.
>
> The callback function then needs to distinguish whether a particular
> allocation has to survive the complete enumeration or only one iteration
> and choose the appropriate pool.
>
> Since creating a new pool adds overhead, I feel that the caller of
> svn_config_enumerate2() & co. should have a choice on whether an
> iteration pool is to be created or not. That's controlled by the value
> of the argument create_iteration_pool.

I've not looked at this at all but I think that's a horrible idea (sorry!).
The execution-time overhead of creating a pool is small; the
interface-complexity overhead of an argument to control it is worse. I can
investigate in more detail tomorrow if necessary; I just wanted to mention it
straight away.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jul 28 02:04:16 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.