Yeah, +1 from me, too.
Daniel L. Rall wrote:
> 1.5.x backport? If so, +1 from me.
>
> On Thu, 13 Mar 2008, rooneg_at_tigris.org wrote:
>
>> Author: rooneg
>> Date: Thu Mar 13 12:36:22 2008
>> New Revision: 29898
>>
>> Log:
>> Use an iteration pool when looking up entry kinds in base_dir_entries.
>>
>> * subversion/libsvn_fs_base/tree.c
>> (base_dir_entries): Use an iteration pool instead of putting everything
>> in our main pool, since nothing we allocate in that loop needs to live any
>> longer than the loop body. Also fix a typo while I'm here.
>>
>> Modified:
>> trunk/subversion/libsvn_fs_base/tree.c
>>
>> Modified: trunk/subversion/libsvn_fs_base/tree.c
>> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_fs_base/tree.c?pathrev=29898&r1=29897&r2=29898
>> ==============================================================================
>> --- trunk/subversion/libsvn_fs_base/tree.c Thu Mar 13 10:26:54 2008 (r29897)
>> +++ trunk/subversion/libsvn_fs_base/tree.c Thu Mar 13 12:36:22 2008 (r29898)
>> @@ -1451,6 +1451,7 @@ base_dir_entries(apr_hash_t **table_p,
>> apr_pool_t *pool)
>> {
>> struct dir_entries_args args;
>> + apr_pool_t *iterpool;
>> apr_hash_t *table;
>> svn_fs_t *fs = root->fs;
>> apr_hash_index_t *hi;
>> @@ -1461,6 +1462,8 @@ base_dir_entries(apr_hash_t **table_p,
>> SVN_ERR(svn_fs_base__retry_txn(root->fs, txn_body_dir_entries, &args,
>> pool));
>>
>> + iterpool = svn_pool_create(pool);
>> +
>> /* Add in the kind data. */
>> for (hi = apr_hash_first(pool, table); hi; hi = apr_hash_next(hi))
>> {
>> @@ -1468,16 +1471,20 @@ base_dir_entries(apr_hash_t **table_p,
>> struct node_kind_args nk_args;
>> void *val;
>>
>> + svn_pool_clear(iterpool);
>> +
>> /* KEY will be the entry name in ancestor (about which we
>> - simple don't care), VAL the dirent. */
>> + simply don't care), VAL the dirent. */
>> apr_hash_this(hi, NULL, NULL, &val);
>> entry = val;
>> nk_args.id = entry->id;
>> SVN_ERR(svn_fs_base__retry_txn(fs, txn_body_node_kind, &nk_args,
>> - pool));
>> + iterpool));
>> entry->kind = nk_args.kind;
>> }
>>
>> + svn_pool_destroy(iterpool);
>> +
>> *table_p = table;
>> return SVN_NO_ERROR;
>> }
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: svn-unsubscribe_at_subversion.tigris.org
>> For additional commands, e-mail: svn-help_at_subversion.tigris.org
>
--
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand
Received on 2008-03-13 22:33:11 CET