You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Malcolm Rowe <ma...@farside.org.uk> on 2007/01/10 17:13:14 UTC
Re: svn commit: r22957 - trunk/subversion/libsvn_client
On Wed, Jan 10, 2007 at 09:05:25AM -0800, hwright@tigris.org wrote:
> Log:
> Use a subpool for copy and move operations. If the copy or move fails, and the
> *_as_child flag is set, we try again. By adding this subpool, we make sure
> that the memory from the first try (as well as the second) is cleared.
>
That's not a typical use of a subpool, unless we have reason to believe
that the setup_copy() operation will allocate a significant amount of
memory.
Regards,
Malcolm
Re: svn commit: r22957 - trunk/subversion/libsvn_client
Posted by Malcolm Rowe <ma...@farside.org.uk>.
On Wed, Jan 10, 2007 at 11:54:33AM -0600, Hyrum K. Wright wrote:
> >>> That's not a typical use of a subpool, unless we have reason to believe
> >>> that the setup_copy() operation will allocate a significant amount of
> >>> memory.
> >> I don't have any figures, and I'm not sure what the threshold is for "a
> >> significant amount", but my feeling is that the amount of memory isn't
> >> trivial.
> >>
> >> If this is wrong, though, I'm happy to revert.
> >
> > Will setup_copy() allocate a potentially unbounded number of data
> > structures (e.g. svn_client_commit_item3_t's)? If so, use of a
> > subpool seems reasonable here.
>
> Yes. There are several data structures (depending on the mode) which
> could be allocated an unbound number of times.
>
Sounds like a sensible change then. Sorry for asking, I was just
surprised not to see setup_copy() manage those allocations itself (which,
as Dan points out, would be hard as we need to ensure that they're passed
back to the caller).
Regards,
Malcolm
Re: svn commit: r22957 - trunk/subversion/libsvn_client
Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
Daniel Rall wrote:
> On Wed, 10 Jan 2007, Hyrum K. Wright wrote:
>
>> Malcolm Rowe wrote:
>>> On Wed, Jan 10, 2007 at 09:05:25AM -0800, hwright@tigris.org wrote:
>>>> Log:
>>>> Use a subpool for copy and move operations. If the copy or move fails, and the
>>>> *_as_child flag is set, we try again. By adding this subpool, we make sure
>>>> that the memory from the first try (as well as the second) is cleared.
>>>>
>>> That's not a typical use of a subpool, unless we have reason to believe
>>> that the setup_copy() operation will allocate a significant amount of
>>> memory.
>> I don't have any figures, and I'm not sure what the threshold is for "a
>> significant amount", but my feeling is that the amount of memory isn't
>> trivial.
>>
>> If this is wrong, though, I'm happy to revert.
>
> Will setup_copy() allocate a potentially unbounded number of data
> structures (e.g. svn_client_commit_item3_t's)? If so, use of a
> subpool seems reasonable here.
Yes. There are several data structures (depending on the mode) which
could be allocated an unbound number of times.
-Hyrum
Re: svn commit: r22957 - trunk/subversion/libsvn_client
Posted by Daniel Rall <dl...@collab.net>.
On Wed, 10 Jan 2007, Ivan Zhakov wrote:
> On 1/10/07, Daniel Rall <dl...@collab.net> wrote:
> >On Wed, 10 Jan 2007, Hyrum K. Wright wrote:
> >
> >> Malcolm Rowe wrote:
> >> > On Wed, Jan 10, 2007 at 09:05:25AM -0800, hwright@tigris.org wrote:
> >> >> Log:
> >> >> Use a subpool for copy and move operations. If the copy or move
> >fails, and the
> >> >> *_as_child flag is set, we try again. By adding this subpool, we
> >make sure
> >> >> that the memory from the first try (as well as the second) is cleared.
> >> >>
> >> >
> >> > That's not a typical use of a subpool, unless we have reason to believe
> >> > that the setup_copy() operation will allocate a significant amount of
> >> > memory.
> >>
> >> I don't have any figures, and I'm not sure what the threshold is for "a
> >> significant amount", but my feeling is that the amount of memory isn't
> >> trivial.
> >>
> >> If this is wrong, though, I'm happy to revert.
> >
> >Will setup_copy() allocate a potentially unbounded number of data
> >structures (e.g. svn_client_commit_item3_t's)? If so, use of a
> >subpool seems reasonable here.
> >
> I think setup_copy() should care about subpool in this case.
We can't use an iterpool or subpool inside setup_copy(), since we
return some of these data structures from setup_copy(). So, we have
to pass a pool in.
Re: svn commit: r22957 - trunk/subversion/libsvn_client
Posted by Ivan Zhakov <ch...@gmail.com>.
On 1/10/07, Daniel Rall <dl...@collab.net> wrote:
> On Wed, 10 Jan 2007, Hyrum K. Wright wrote:
>
> > Malcolm Rowe wrote:
> > > On Wed, Jan 10, 2007 at 09:05:25AM -0800, hwright@tigris.org wrote:
> > >> Log:
> > >> Use a subpool for copy and move operations. If the copy or move fails, and the
> > >> *_as_child flag is set, we try again. By adding this subpool, we make sure
> > >> that the memory from the first try (as well as the second) is cleared.
> > >>
> > >
> > > That's not a typical use of a subpool, unless we have reason to believe
> > > that the setup_copy() operation will allocate a significant amount of
> > > memory.
> >
> > I don't have any figures, and I'm not sure what the threshold is for "a
> > significant amount", but my feeling is that the amount of memory isn't
> > trivial.
> >
> > If this is wrong, though, I'm happy to revert.
>
> Will setup_copy() allocate a potentially unbounded number of data
> structures (e.g. svn_client_commit_item3_t's)? If so, use of a
> subpool seems reasonable here.
>
I think setup_copy() should care about subpool in this case.
--
Ivan Zhakov
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: r22957 - trunk/subversion/libsvn_client
Posted by Daniel Rall <dl...@collab.net>.
On Wed, 10 Jan 2007, Hyrum K. Wright wrote:
> Malcolm Rowe wrote:
> > On Wed, Jan 10, 2007 at 09:05:25AM -0800, hwright@tigris.org wrote:
> >> Log:
> >> Use a subpool for copy and move operations. If the copy or move fails, and the
> >> *_as_child flag is set, we try again. By adding this subpool, we make sure
> >> that the memory from the first try (as well as the second) is cleared.
> >>
> >
> > That's not a typical use of a subpool, unless we have reason to believe
> > that the setup_copy() operation will allocate a significant amount of
> > memory.
>
> I don't have any figures, and I'm not sure what the threshold is for "a
> significant amount", but my feeling is that the amount of memory isn't
> trivial.
>
> If this is wrong, though, I'm happy to revert.
Will setup_copy() allocate a potentially unbounded number of data
structures (e.g. svn_client_commit_item3_t's)? If so, use of a
subpool seems reasonable here.
Re: svn commit: r22957 - trunk/subversion/libsvn_client
Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
Malcolm Rowe wrote:
> On Wed, Jan 10, 2007 at 09:05:25AM -0800, hwright@tigris.org wrote:
>> Log:
>> Use a subpool for copy and move operations. If the copy or move fails, and the
>> *_as_child flag is set, we try again. By adding this subpool, we make sure
>> that the memory from the first try (as well as the second) is cleared.
>>
>
> That's not a typical use of a subpool, unless we have reason to believe
> that the setup_copy() operation will allocate a significant amount of
> memory.
I don't have any figures, and I'm not sure what the threshold is for "a
significant amount", but my feeling is that the amount of memory isn't
trivial.
If this is wrong, though, I'm happy to revert.
-Hyrum