All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yaacov Akiba Slama <ya@slamail.org>
To: unlisted-recipients:; (no To-header on input)
Subject: [PATCH 1/7] Using svn pools seems to solve the memory leak problem
Date: Wed, 02 Nov 2005 23:51:57 +0200	[thread overview]
Message-ID: <E1EXQWT-000504-Qw@localhost.localdomain> (raw)

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

             reply	other threads:[~2005-11-02 21:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-02 21:51 Yaacov Akiba Slama [this message]
2005-11-02 22:38 ` [PATCH 1/7] Using svn pools seems to solve the memory leak problem Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1EXQWT-000504-Qw@localhost.localdomain \
    --to=ya@slamail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.