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

Re: svn commit: r1662222 - in /subversion/branches/reuse-ra-session/subversion: include/private/svn_ra_private.h libsvn_client/ra_cache.c libsvn_ra/ra_loader.c

From: Branko Čibej <brane_at_wandisco.com>
Date: Wed, 25 Feb 2015 15:40:09 +0100

On 25.02.2015 15:23, ivan_at_apache.org wrote:
> Author: ivan
> Date: Wed Feb 25 14:23:00 2015
> New Revision: 1662222
>
> URL: http://svn.apache.org/r1662222
> Log:
> On the 'reuse-ra-session' branch: Resolve memory leak.
>
> * subversion/libsvn_client/ra_cache.c
> (): Include "svn_pools.h".
>
> (cache_entry_t): Add SESSION_POOL member to have an option to destroy
> CACHE_ENTRY structure itself.
>
> (close_ra_session, remove_inactive_entry): Destroy SESSION_POOL
> instead of closing RA session -- we have other resources allocated
> for RA session, like RA callback baton, cache_entry etc.
>
> (open_new_session): New helper, factored out from
> svn_client__ra_cache_open_session().
>
> (svn_client__ra_cache_open_session): Create separate subpool for
> each CACHE_ENTRY and destroy it on error.

So ... from this point on, we create *two* subpools for each session
(svn_ra_open creates one, and with the above change, we create the
other). That seems wasteful.

I'd prefer to have a way to tell svn_ra_open to /not/ create a subpool
for the session, perhaps by exposing a private ra-open function where we
can pass in the actual session pool, and to keep svn_ra__close.

-- Brane
Received on 2015-02-25 15:42:27 CET

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.