git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/7] Using svn pools seems to solve the memory leak problem

From
YSYaacov Akiba Slama <ya@slamail.org>
Date
Nov 2, 2005, 21:51 UTC
Message-ID
<E1EXQWT-000504-Qw@localhost.localdomain>
Signed-off-by: Yaacov Akiba Slama <ya@slamail.org>
---
 git-svnimport.perl |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

applies-to: b12655de9a371d7d16f7e8318da8c5b0099c39bd 4356b879b425644c436eacb6d43b523bab960704

diff --git a/git-svnimport.perl b/git-svnimport.perl
index 45b6a19..5bf9ef2 100755
--- a/git-svnimport.perl
+++ b/git-svnimport.perl
@@ -112,7 +112,9 @@ sub file {
 		    DIR => File::Spec->tmpdir(), UNLINK => 1);
 
 	print "... $rev $path ...\n" if $opt_v;
-	eval { $self->{'svn'}->get_file($path,$rev,$fh); };
+	my $pool = SVN::Pool->new();
+	eval { $self->{'svn'}->get_file($path,$rev,$fh,$pool); };
+	$pool->clear;
 	if($@) {
 		return undef if $@ =~ /Attempted to get checksum/;
 		die $@;
@@ -674,7 +676,9 @@ sub commit_all {
 }
 
 while(++$current_rev <= $svn->{'maxrev'}) {
-	$svn->{'svn'}->get_log("/",$current_rev,$current_rev,$current_rev,1,1,\&_commit_all,"");
+	my $pool=SVN::Pool->new;
+	$svn->{'svn'}->get_log("/",$current_rev,$current_rev,1,1,1,\&_commit_all,$pool);
+	$pool->clear;
 	commit_all();
 	if($opt_l and not --$opt_l) {
 		print STDERR "Stopping, because there is a memory leak (in the SVN library).\n";
---
0.99.9.GIT
Next: Junio C Hamano
Message 1 of 2 in “Using svn pools seems to solve the memory leak problem”
  1. 1/7 Using svn pools seems to solve the memory leak problemYaacov Akiba Slama, Nov 2, 2005
  2. Junio C HamanoNov 2, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.