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

[PATCH] set cachebuffer allocator owner

From: Daniel Shahaf <danielsh_at_elego.de>
Date: Fri, 29 Jul 2011 02:31:22 +0300

The following patch:

[[[
Index: subversion/libsvn_subr/svn_cache_config.c
===================================================================
--- subversion/libsvn_subr/svn_cache_config.c (revision 1152032)
+++ subversion/libsvn_subr/svn_cache_config.c (working copy)
@@ -113,6 +113,7 @@ svn_cache__get_global_membuffer_cache(void)
       apr_pool_create_ex(&pool, NULL, NULL, allocator);
       if (pool == NULL)
         return NULL;
+ apr_allocator_owner_set(allocator, pool);
 
       err = svn_cache__membuffer_cache_create(
           &new_cache,
]]]

causes the following valgrind warning to disappear:

[[[
==28089== 104 bytes in 1 blocks are definitely lost in loss record 1 of 1
==28089== at 0x4023F50: malloc (vg_replace_malloc.c:236)
==28089== by 0x41E7F7E: apr_allocator_create (apr_pools.c:124)
==28089== by 0x419B16F: svn_cache__get_global_membuffer_cache (svn_cache_config.c:94)
==28089== by 0x457B5FC: svn_fs_fs__initialize_caches (caching.c:261)
==28089== by 0x457F117: fs_create (fs.c:192)
==28089== by 0x43D396F: svn_fs_create (fs-loader.c:411)
==28089== by 0x43C04E5: svn_repos_create (repos.c:1260)
==28089== by 0x4097949: svn_test__create_repos (svn_test_fs.c:215)
==28089== by 0x805FBC0: create_repos_and_wc (utils.c:77)
==28089== by 0x805FFF5: svn_test__sandbox_create (utils.c:151)
==28089== by 0x805390B: test_delete_of_replace (op-depth-test.c:1792)
==28089== by 0x409AE1D: do_test_num (svn_test_main.c:275)
]]]

Can I have a +1? I looked up the APR docs, but they were less than useful.

  • text/plain attachment: before
  • text/plain attachment: after
Received on 2011-07-29 01:32:47 CEST

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.