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

Re: svn commit: r11830 - trunk/subversion/libsvn_diff

From: Sander Striker <striker_at_apache.org>
Date: 2004-11-19 22:58:38 CET

On Fri, 2004-11-12 at 11:32, kfogel@collab.net wrote:
> striker@tigris.org writes:
> > --- trunk/subversion/libsvn_diff/diff.h (original)
> > +++ trunk/subversion/libsvn_diff/diff.h Wed Nov 10 19:26:57 2004
> > @@ -67,6 +67,7 @@
> > svn_diff__lcs_t *next;
> > svn_diff__position_t *position[2];
> > apr_off_t length;
> > + int refcount;
> > };
>
> I suggest documenting the exact meaning of the refcount field. For
> example, is an svn_diff__lcs_t born with a refcount of 0 or 1? Does
> it count the number of nodes before it or after it, inclusive or
> exclusive?

Yeah, I suck...

[...]
> > + /* strikerXXX: here we allocate the furthest point array, which is
> > + * strikerXXX: sized M + N + 3 (!)
> > + */
> > fp = apr_pcalloc(pool,
> > sizeof(*fp) * (apr_size_t)(length[0] + length[1] + 3));
> > fp += length[idx] + 1;
>
> And the problem with that is that it the array could be very large,
> because we have to preallocate the whole thing, right? (Asking as a
> sanity check.)

That is indeed correct. Which is exactly why I need to revisit all this
code at some point. I haven't found the drive and energy to do it yet.

Sander

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Nov 19 23:00:16 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.