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/06/23 17:51:42 UTC
svn commit: r1604844 -
/subversion/trunk/subversion/libsvn_fs_fs/cached_data.c
Author: stsp
Date: Mon Jun 23 15:51:42 2014
New Revision: 1604844
URL: http://svn.apache.org/r1604844
Log:
* subversion/libsvn_fs_fs/cached_data.c
(read_delta_window): Use an iterpool while skipping over windows.
Modified:
subversion/trunk/subversion/libsvn_fs_fs/cached_data.c
Modified: subversion/trunk/subversion/libsvn_fs_fs/cached_data.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/cached_data.c?rev=1604844&r1=1604843&r2=1604844&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/cached_data.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/cached_data.c Mon Jun 23 15:51:42 2014
@@ -1456,6 +1456,8 @@ read_delta_window(svn_txdelta_window_t *
svn_boolean_t is_cached;
apr_off_t start_offset;
apr_off_t end_offset;
+ apr_pool_t *iterpool;
+
SVN_ERR_ASSERT(rs->chunk_index <= this_chunk);
SVN_ERR(dbg_log_access(rs->sfile->fs, rs->revision, rs->item_index,
@@ -1498,12 +1500,14 @@ read_delta_window(svn_txdelta_window_t *
SVN_ERR(rs_aligned_seek(rs, NULL, start_offset, pool));
/* Skip windows to reach the current chunk if we aren't there yet. */
+ iterpool = svn_pool_create(pool);
while (rs->chunk_index < this_chunk)
{
+ svn_pool_clear(iterpool);
SVN_ERR(svn_txdelta_skip_svndiff_window(rs->sfile->rfile->file,
- rs->ver, pool));
+ rs->ver, iterpool));
rs->chunk_index++;
- SVN_ERR(get_file_offset(&start_offset, rs, pool));
+ SVN_ERR(get_file_offset(&start_offset, rs, iterpool));
rs->current = start_offset - rs->start;
if (rs->current >= rs->size)
return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
@@ -1511,6 +1515,7 @@ read_delta_window(svn_txdelta_window_t *
"beyond the end of the "
"representation"));
}
+ svn_pool_destroy(iterpool);
/* Actually read the next window. */
SVN_ERR(svn_txdelta_read_svndiff_window(nwin, rs->sfile->rfile->stream,