3 * ====================================================================
\r
4 * Copyright (c) 2000-2004, 2008 CollabNet. All rights reserved.
\r
6 * This software is licensed as described in the file COPYING, which
\r
7 * you should have received as part of this distribution. The terms
\r
8 * are also available at http://subversion.tigris.org/license-1.html.
\r
9 * If newer versions of this license are posted there, you may use a
\r
10 * newer version instead, at your option.
\r
12 * This software consists of voluntary contributions made by many
\r
13 * individuals. For exact contribution history, see the revision
\r
14 * history and logs, available at http://subversion.tigris.org/.
\r
15 * ====================================================================
\r
19 * @brief APR pool management for Subversion
\r
28 #include <apr_pools.h>
\r
32 #endif /* __cplusplus */
\r
36 /* Wrappers around APR pools, so we get debugging. */
\r
38 /** The recommended maximum amount of memory (4MB) to keep in an APR
\r
39 * allocator on the free list, conveniently defined here to share
\r
40 * between all our applications.
\r
42 #define SVN_ALLOCATOR_RECOMMENDED_MAX_FREE (4096 * 1024)
\r
45 /** Wrapper around apr_pool_create_ex(), with a simpler interface.
\r
46 * The return pool will have an abort function set, which will call
\r
50 svn_pool_create_ex(apr_pool_t *parent_pool,
\r
51 apr_allocator_t *allocator);
\r
53 #ifndef DOXYGEN_SHOULD_SKIP_THIS
\r
55 svn_pool_create_ex_debug(apr_pool_t *parent_pool,
\r
56 apr_allocator_t *allocator,
\r
57 const char *file_line);
\r
60 #define svn_pool_create_ex(pool, allocator) \
\r
61 svn_pool_create_ex_debug(pool, allocator, APR_POOL__FILE_LINE__)
\r
63 #endif /* APR_POOL_DEBUG */
\r
64 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
\r
67 /** Create a pool as a subpool of @a parent_pool */
\r
68 #define svn_pool_create(parent_pool) svn_pool_create_ex(parent_pool, NULL)
\r
70 /** Clear a @a pool destroying its children.
\r
72 * This define for @c svn_pool_clear exists for completeness.
\r
74 #define svn_pool_clear apr_pool_clear
\r
77 /** Destroy a @a pool and all of its children.
\r
79 * This define for @c svn_pool_destroy exists for symmetry and
\r
82 #define svn_pool_destroy apr_pool_destroy
\r
87 #endif /* __cplusplus */
\r
89 #endif /* SVN_POOLS_H */
\r