Author: pburba
Date: Thu Dec  2 16:37:22 2010
New Revision: 1041438

URL: http://svn.apache.org/viewvc?rev=1041438&view=rev
Log:
Follow-up to the r1032808 blame -g server-side memory leak fix.

In the test case described in
http://svn.haxx.se/dev/archive-2010-11/0163.shtml, r1032808 dropped
svnserve's peak memory use from 574 MB to 71 MB.  This change further drops
that to 51 MB.

* subversion/libsvn_repos/rev_hunt.c
  (find_interesting_revisions): Allocate iterpools from the scratch pool,
   not the result pool, and destroy *both* iterpools.

Suggested by: philip

Modified:
    subversion/trunk/subversion/libsvn_repos/rev_hunt.c

Modified: subversion/trunk/subversion/libsvn_repos/rev_hunt.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/rev_hunt.c?rev=1041438&r1=1041437&r2=1041438&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/rev_hunt.c (original)
+++ subversion/trunk/subversion/libsvn_repos/rev_hunt.c Thu Dec  2 16:37:22 2010
@@ -1095,8 +1095,8 @@ find_interesting_revisions(apr_array_hea
 
   /* We switch between two pools while looping, since we need information from
      the last iteration to be available. */
-  iterpool = svn_pool_create(result_pool);
-  last_pool = svn_pool_create(result_pool);
+  iterpool = svn_pool_create(scratch_pool);
+  last_pool = svn_pool_create(scratch_pool);
 
   /* The path had better be a file in this revision. */
   SVN_ERR(svn_fs_revision_root(&root, repos->fs, end, scratch_pool));
@@ -1175,6 +1175,7 @@ find_interesting_revisions(apr_array_hea
     }
 
   svn_pool_destroy(iterpool);
+  svn_pool_destroy(last_pool);
 
   return SVN_NO_ERROR;
 }


Reply via email to