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 2014/11/13 19:13:52 UTC

svn commit: r1639426 - /subversion/trunk/subversion/libsvn_fs_fs/stats.c

Author: stefan2
Date: Thu Nov 13 18:13:52 2014
New Revision: 1639426

URL: http://svn.apache.org/r1639426
Log:
* subversion/libsvn_fs_fs/stats.c
  (get_phys_change_count): Explain why we use a SUBPOOL here.
                           No functional change.

Modified:
    subversion/trunk/subversion/libsvn_fs_fs/stats.c

Modified: subversion/trunk/subversion/libsvn_fs_fs/stats.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/stats.c?rev=1639426&r1=1639425&r2=1639426&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/stats.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/stats.c Thu Nov 13 18:13:52 2014
@@ -656,6 +656,10 @@ get_phys_change_count(query_t *query,
                       revision_info_t *revision_info,
                       apr_pool_t *scratch_pool)
 {
+  /* We are going to use our own sub-pool here because the changes object
+   * may well be >100MB and SCRATCH_POOL may not get cleared until all other
+   * info has been read by read_phys_revision().  Therefore, tidy up early.
+   */
   apr_pool_t *subpool = svn_pool_create(scratch_pool);
   apr_array_header_t *changes;
 
@@ -663,6 +667,7 @@ get_phys_change_count(query_t *query,
                                  revision_info->revision, subpool));
   revision_info->change_count = changes->nelts;
 
+  /* Release potentially tons of memory. */
   svn_pool_destroy(subpool);
 
   return SVN_NO_ERROR;