[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Fix fsfs finalization memory usage

From: Eric Gillespie <epg_at_pretzelnet.org>
Date: 2004-11-01 20:21:34 CET

kfogel@collab.net writes:

> > - SVN_ERR (read_change (&change, file, pool));
> > + SVN_ERR (read_change (&change, file, iterpool));
> >
> > while (change)
> > {

[...]

> You could move the initial read_change() call right up against the
> 'while' loop, and add a comment to indicate that that first call is
> really the start of the loop -- the initialization stage of the loop,
> in a sense.

Look at the bit i re-quoted above. change is the loop condition,
so moving read_change to the top and losing the one outside the
loop doesn't work.

> But I think a better option would be to switch to a 'do-while' loop,
> and put the single read_change() call at the start of the loop.

I'd have to go for this nastiness:

  do
    {
      SVN_ERR (read_change (&change, file, iterpool));
      if (!change)
        break;
...

I think it's best the way it is.

--
Eric Gillespie <*> epg@pretzelnet.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Nov 1 20:22:21 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.