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

Re: result_pool and scratch_pool

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: Tue, 07 Oct 2008 11:35:10 -0400

Are there any practical problems which are solved by a scratch pool and
a result pool?

Our old discipline was:

  * Pass a pool which is used for scratch and results.
  * If you're going to loop, use a subpool.
  * Be streamy (don't read whole files into memory).

So every scratch allocation should be constant. The memory usage from
this discipline is O(stack size), which is generally not all that large.

Passing around two pools is a lot of code noise. I wouldn't suggest
doing it unless it solves a real problem.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-10-07 17:35:26 CEST

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.