You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Hudson <gh...@MIT.EDU> on 2004/04/23 02:10:34 UTC

Re: svn commit: r9462 - in trunk/subversion: libsvn_fs libsvn_fs_fs

On Thu, 2004-04-22 at 18:50, jpieper@tigris.org wrote:
> -  svn_fs_root_t *root = apr_pcalloc (subpool, sizeof (*root));
> +  svn_fs_root_t *root = apr_pcalloc (pool, sizeof (*root));

Why this part of the change?  There shouldn't be anything wrong with
allocating the root from the subpool.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r9462 - in trunk/subversion: libsvn_fs libsvn_fs_fs

Posted by Greg Hudson <gh...@MIT.EDU>.
On Thu, 2004-04-22 at 22:38, Josh Pieper wrote:
> When the root is closed, there is a command like:
> 
> svn_pool_destroy (root->pool);
> 
> I may have been mistaken, but is it OK to destroy the pool that
> contains the pointer to the pool you are destroying?  If so, then I
> will revert that portion of the change.

Yes, it's okay to do so.  root->pool is evaluated before
svn_pool_destroy() is called; the expression doesn't have to remain
valid after that.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r9462 - in trunk/subversion: libsvn_fs libsvn_fs_fs

Posted by Josh Pieper <jp...@andrew.cmu.edu>.
> > -  svn_fs_root_t *root = apr_pcalloc (subpool, sizeof (*root));
> > +  svn_fs_root_t *root = apr_pcalloc (pool, sizeof (*root));
> 
> Why this part of the change?  There shouldn't be anything wrong with
> allocating the root from the subpool.

When the root is closed, there is a command like:

svn_pool_destroy (root->pool);

I may have been mistaken, but is it OK to destroy the pool that
contains the pointer to the pool you are destroying?  If so, then I
will revert that portion of the change.

-Josh

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org