On 1/15/07, dlr@tigris.org <dlr@tigris.org> wrote:
> Author: dlr
> Date: Mon Jan 15 10:24:15 2007
> New Revision: 23017
>
> Log:
> Reduce lifetime/size of memory footprint for 'proplist'.
>
> * subversion/libsvn_client/prop_commands.c
> (svn_client_proplist2): Destroy sub-pool after use.
The log message is a little misleading -- it implies that the subpool
was always there, and that we'd just been forgetting to destroy it :-).
Unrelatedly: this is an unusual pool usage for us. Clearly it was
anticipated, since remote_proplist() already took that "scratchpool"
parameter, but (on a quick glance) I wasn't quite sure why our
usual "caller decides when to use a loop pool" paradigm wouldn't
work here.
-Karl
> Patch by: bhuvan
> (Tweaked by me.)
> Reviewed by: lundblad
>
>
> Modified:
> trunk/subversion/libsvn_client/prop_commands.c
>
> Modified: trunk/subversion/libsvn_client/prop_commands.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_client/prop_commands.c?pathrev=23017&r1=23016&r2=23017
> ==============================================================================
> --- trunk/subversion/libsvn_client/prop_commands.c (original)
> +++ trunk/subversion/libsvn_client/prop_commands.c Mon Jan 15 10:24:15 2007
> @@ -1102,6 +1102,7 @@
> {
> svn_ra_session_t *ra_session;
> svn_node_kind_t kind;
> + apr_pool_t *subpool = svn_pool_create(pool);
>
> /* Get an RA session for this URL. */
> SVN_ERR(svn_client__ra_session_from_path(&ra_session, &revnum,
> @@ -1112,7 +1113,8 @@
>
> SVN_ERR(remote_proplist(*props, url, "",
> kind, revnum, ra_session,
> - recurse, pool, svn_pool_create(pool)));
> + recurse, pool, subpool));
> + svn_pool_destroy(subpool);
> }
> else /* working copy path */
> {
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svn-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: svn-help@subversion.tigris.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jan 15 20:45:24 2007