You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2015/01/06 16:15:14 UTC
svn commit: r1649823 - /subversion/trunk/subversion/libsvn_fs_x/caching.c
Author: stefan2
Date: Tue Jan 6 15:15:14 2015
New Revision: 1649823
URL: http://svn.apache.org/r1649823
Log:
Continue migrating FSX to the two-pool paradigm. Some single-pool functions
don't allocate temporary data, i.e. their pools can immediately be renamed
to RESULT_POOL. Do this for caching.c.
* subversion/libsvn_fs_x/caching.c
(normalize_key_part,
read_config): POOL is actually a RESULT_POOL.
Modified:
subversion/trunk/subversion/libsvn_fs_x/caching.c
Modified: subversion/trunk/subversion/libsvn_fs_x/caching.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/caching.c?rev=1649823&r1=1649822&r2=1649823&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/caching.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/caching.c Tue Jan 6 15:15:14 2015
@@ -43,15 +43,16 @@
#include "private/svn_subr_private.h"
/* Take the ORIGINAL string and replace all occurrences of ":" without
- * limiting the key space. Allocate the result in POOL.
+ * limiting the key space. Allocate the result in RESULT_POOL.
*/
static const char *
normalize_key_part(const char *original,
- apr_pool_t *pool)
+ apr_pool_t *result_pool)
{
apr_size_t i;
apr_size_t len = strlen(original);
- svn_stringbuf_t *normalized = svn_stringbuf_create_ensure(len, pool);
+ svn_stringbuf_t *normalized = svn_stringbuf_create_ensure(len,
+ result_pool);
for (i = 0; i < len; ++i)
{
@@ -73,15 +74,14 @@ normalize_key_part(const char *original,
according to FS->CONFIG. *CACHE_NAMESPACE receives the cache prefix
to use.
- Use FS->pool for allocating the memcache and CACHE_NAMESPACE, and POOL
- for temporary allocations. */
+ Allocate CACHE_NAMESPACE in RESULT_POOL. */
static svn_error_t *
read_config(const char **cache_namespace,
svn_boolean_t *cache_txdeltas,
svn_boolean_t *cache_fulltexts,
svn_boolean_t *cache_revprops,
svn_fs_t *fs,
- apr_pool_t *pool)
+ apr_pool_t *result_pool)
{
/* No cache namespace by default. I.e. all FS instances share the
* cached data. If you specify different namespaces, the data will
@@ -97,7 +97,7 @@ read_config(const char **cache_namespace
= normalize_key_part(svn_hash__get_cstring(fs->config,
SVN_FS_CONFIG_FSFS_CACHE_NS,
""),
- pool);
+ result_pool);
/* don't cache text deltas by default.
* Once we reconstructed the fulltexts from the deltas,