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

Re: Guaranteeing memory pool lifetime

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2005-07-05 18:23:55 CEST

On Tue, 2005-07-05 at 08:06 +0100, Matthew Hambley wrote:
> As I understand the usage of memory pools in subversion all I can take for
> granted is that the pool passed into a function will exist for the duration
> of the call. However I want to allocate some space which persists for the
> lifetime of the client. What pool should I use which has such a lifespan
> and how would I access it?

Pools in Subversion calls are also assumed to last as long as the caller
is interested in any data returned by the call.

The only way to get a pool with an unlimited lifespan is to call
svn_pool_create(NULL) to create a child of the global pool, and destroy
it explicitly when it is no longer needed. That's how we handle
svn_error_t objects, for instance.

Why do you want to allocate space which persists for the lifetime of the
client?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jul 5 19:08:05 2005

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