You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2012/03/24 20:39:40 UTC
svn commit: r1304890 -
/subversion/branches/node_pool/subversion/libsvn_fs_fs/tree.c
Author: danielsh
Date: Sat Mar 24 19:39:40 2012
New Revision: 1304890
URL: http://svn.apache.org/viewvc?rev=1304890&view=rev
Log:
On the node_pool branch, improve pool usage. Puts r1304888 to use.
* subversion/libsvn_fs_fs/tree.c
(open_path): Use an iterpool.
Modified:
subversion/branches/node_pool/subversion/libsvn_fs_fs/tree.c
Modified: subversion/branches/node_pool/subversion/libsvn_fs_fs/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/node_pool/subversion/libsvn_fs_fs/tree.c?rev=1304890&r1=1304889&r2=1304890&view=diff
==============================================================================
--- subversion/branches/node_pool/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/branches/node_pool/subversion/libsvn_fs_fs/tree.c Sat Mar 24 19:39:40 2012
@@ -594,6 +594,7 @@ open_path(parent_path_t **parent_path_p,
const char *rest; /* The portion of PATH we haven't traversed yet. */
const char *canon_path = svn_fs__canonicalize_abspath(path, pool);
const char *path_so_far = "/";
+ apr_pool_t *iterpool = svn_pool_create(pool);
/* Make a parent_path item for the root node, using its own current
copy id. */
@@ -614,6 +615,8 @@ open_path(parent_path_t **parent_path_p,
char *entry;
dag_node_t *child;
+ svn_pool_clear(iterpool);
+
/* Parse out the next entry from the path. */
entry = svn_fs__next_entry_name(&next, rest, pool);
@@ -642,7 +645,7 @@ open_path(parent_path_t **parent_path_p,
if (cached_node)
child = cached_node;
else
- err = svn_fs_fs__dag_open(&child, here, entry, pool, pool);
+ err = svn_fs_fs__dag_open(&child, here, entry, pool, iterpool);
/* "file not found" requires special handling. */
if (err && err->apr_err == SVN_ERR_FS_NOT_FOUND)
@@ -699,6 +702,7 @@ open_path(parent_path_t **parent_path_p,
here = child;
}
+ svn_pool_destroy(iterpool);
*parent_path_p = parent_path;
return SVN_NO_ERROR;
}