diff options
Diffstat (limited to 'subversion/include/svn_pools.h')
-rw-r--r-- | subversion/include/svn_pools.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/subversion/include/svn_pools.h b/subversion/include/svn_pools.h index 4dc02c6..d4c3a53 100644 --- a/subversion/include/svn_pools.h +++ b/subversion/include/svn_pools.h @@ -30,7 +30,7 @@ #ifndef SVN_POOLS_H #define SVN_POOLS_H -#include <apr_pools.h> +#include "svn_types.h" #ifdef __cplusplus extern "C" { @@ -86,6 +86,26 @@ svn_pool_create_ex_debug(pool, allocator, APR_POOL__FILE_LINE__) */ #define svn_pool_destroy apr_pool_destroy +/** Return a new allocator. This function limits the unused memory in the + * new allocator to #SVN_ALLOCATOR_RECOMMENDED_MAX_FREE and ensures + * proper synchronization if the allocator is used by multiple threads. + * + * If your application uses multiple threads, creating a separate + * allocator for each of these threads may not be feasible. Set the + * @a thread_safe parameter to @c TRUE in that case; otherwise, set @a + * thread_safe to @c FALSE to maximize performance. + * + * @note Even if @a thread_safe is @c TRUE, pools themselves will + * still not be thread-safe and their access may require explicit + * serialization. + * + * To access the owner pool, which can also serve as the root pool for + * your sub-pools, call @c apr_allocator_get_owner(). + * + * @since: New in 1.8 + */ +apr_allocator_t * +svn_pool_create_allocator(svn_boolean_t thread_safe); #ifdef __cplusplus } |