On 14.10.2011 13:17, Stefan Sperling wrote:
> The perl bindings don't abstract away memory pool handling.
> If you don't pass a pool argument to fs->revision_root(),
> it will use the global pool, which can never be cleared.
>
> You need to use an iteration pool in your script and clear it after
> each iteration of the for-loop.
> See 
> http://subversion.apache.org/docs/community-guide/conventions.html#apr-pools
>
> A good perl code example is this commit to git.git; see the change
> to the while loop at the bottom, which creates a new default subpool
> for functions to use, and clears it after each iteration.
> +my $subpool = SVN::Pool::new_default_sub;
>  while ($to_rev < $opt_l) {
> +     $subpool->clear;
>       $from_rev = $to_rev + 1;
>       $to_rev = $from_rev + $repack_after;
>       $to_rev = $opt_l if $opt_l < $to_rev;
>       print "Fetching from $from_rev to $to_rev ...\n" if $opt_v;
> -     my $pool=SVN::Pool->new;
> -     $svn->{'svn'}->get_log("/",$from_rev,$to_rev,0,1,1,\&commit_all,$pool);
> -     $pool->clear;
> +     $svn->{'svn'}->get_log("/",$from_rev,$to_rev,0,1,1,\&commit_all);
>       my $pid = fork();
>       die "Fork: $!\n" unless defined $pid;
>       unless($pid) {

Thank you very much, this was indeed helpful.

kind regards,
Max Voit

Reply via email to