46 #define APR_WANT_MEMFUNC
81 #define APR_POOL_DECLARE_ACCESSOR(type) \
82 APR_DECLARE(apr_pool_t *) apr_##type##_pool_get \
83 (const apr_##type##_t *the##type)
91 #define APR_POOL_IMPLEMENT_ACCESSOR(type) \
92 APR_DECLARE(apr_pool_t *) apr_##type##_pool_get \
93 (const apr_##type##_t *the##type) \
94 { return the##type->pool; }
132 #if defined(APR_POOL_DEBUG)
134 #if (APR_POOL_DEBUG - APR_POOL_DEBUG -1 == 1)
135 #undef APR_POOL_DEBUG
136 #define APR_POOL_DEBUG 1
139 #define APR_POOL_DEBUG 0
143 #define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
179 #include "apr_allocator.h"
200 __attribute__((nonnull(1)));
229 __attribute__((nonnull(1)));
251 const
char *file_line)
252 __attribute__((nonnull(1)));
255 #define apr_pool_create_ex(newpool, parent, abort_fn, allocator) \
256 apr_pool_create_ex_debug(newpool, parent, abort_fn, allocator, \
257 APR_POOL__FILE_LINE__)
267 const
char *file_line);
287 const
char *file_line)
288 __attribute__((nonnull(1)));
291 #define apr_pool_create_core_ex(newpool, abort_fn, allocator) \
292 apr_pool_create_unmanaged_ex_debug(newpool, abort_fn, allocator, \
293 APR_POOL__FILE_LINE__)
295 #define apr_pool_create_unmanaged_ex(newpool, abort_fn, allocator) \
296 apr_pool_create_unmanaged_ex_debug(newpool, abort_fn, allocator, \
297 APR_POOL__FILE_LINE__)
318 #define apr_pool_create(newpool, parent) \
319 apr_pool_create_ex_debug(newpool, parent, NULL, NULL, \
320 APR_POOL__FILE_LINE__)
322 #define apr_pool_create(newpool, parent) \
323 apr_pool_create_ex(newpool, parent, NULL, NULL)
336 #define apr_pool_create_core(newpool) \
337 apr_pool_create_unmanaged_ex_debug(newpool, NULL, NULL, \
338 APR_POOL__FILE_LINE__)
339 #define apr_pool_create_unmanaged(newpool) \
340 apr_pool_create_unmanaged_ex_debug(newpool, NULL, NULL, \
341 APR_POOL__FILE_LINE__)
343 #define apr_pool_create_core(newpool) \
344 apr_pool_create_unmanaged_ex(newpool, NULL, NULL)
345 #define apr_pool_create_unmanaged(newpool) \
346 apr_pool_create_unmanaged_ex(newpool, NULL, NULL)
355 __attribute__((nonnull(1)));
381 const
char *file_line)
382 __attribute__((nonnull(1)));
385 #define apr_pool_clear(p) \
386 apr_pool_clear_debug(p, APR_POOL__FILE_LINE__)
411 const
char *file_line)
412 __attribute__((nonnull(1)));
415 #define apr_pool_destroy(p) \
416 apr_pool_destroy_debug(p, APR_POOL__FILE_LINE__)
431 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
432 __attribute__((alloc_size(2)))
434 __attribute__((nonnull(1)));
445 const
char *file_line)
446 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
447 __attribute__((alloc_size(2)))
449 __attribute__((nonnull(1)));
452 #define apr_palloc(p, size) \
453 apr_palloc_debug(p, size, APR_POOL__FILE_LINE__)
464 #elif !APR_POOL_DEBUG
465 #define apr_pcalloc(p, size) memset(apr_palloc(p, size), 0, size)
477 const
char *file_line)
478 __attribute__((nonnull(1)));
481 #define apr_pcalloc(p, size) \
482 apr_pcalloc_debug(p, size, APR_POOL__FILE_LINE__)
500 __attribute__((nonnull(2)));
508 __attribute__((nonnull(1)));
516 __attribute__((nonnull(1)));
537 __attribute__((nonnull(1)));
567 __attribute__((nonnull(2,4)));
589 const
void *data, const
char *key,
592 __attribute__((nonnull(2,4)));
602 __attribute__((nonnull(1,2,3)));
632 __attribute__((nonnull(3,4)));
649 __attribute__((nonnull(3)));
665 __attribute__((nonnull(3)));
683 __attribute__((nonnull(3,4)));
698 __attribute__((nonnull(3)));
761 #if APR_POOL_DEBUG || defined(DOXYGEN)
768 __attribute__((nonnull(2)));
784 __attribute__((nonnull(1)));
800 #define apr_pool_join(a,b)
805 #define apr_pool_lock(pool, lock)
void * apr_pcalloc_debug(apr_pool_t *p, apr_size_t size, const char *file_line)
apr_status_t apr_pool_create_core_ex(apr_pool_t **newpool, apr_abortfunc_t abort_fn, apr_allocator_t *allocator)
void apr_pool_destroy(apr_pool_t *p)
apr_pool_t * apr_pool_parent_get(apr_pool_t *pool)
void apr_pool_cleanup_for_exec(void)
void apr_pool_tag(apr_pool_t *pool, const char *tag)
apr_status_t apr_pool_userdata_set(const void *data, const char *key, apr_status_t(*cleanup)(void *), apr_pool_t *pool)
void apr_pool_terminate(void)
apr_status_t apr_pool_create_core_ex_debug(apr_pool_t **newpool, apr_abortfunc_t abort_fn, apr_allocator_t *allocator, const char *file_line)
apr_status_t apr_pool_create_ex_debug(apr_pool_t **newpool, apr_pool_t *parent, apr_abortfunc_t abort_fn, apr_allocator_t *allocator, const char *file_line)
void apr_pool_lock(apr_pool_t *pool, int flag)
void * apr_pcalloc(apr_pool_t *p, apr_size_t size)
struct apr_allocator_t apr_allocator_t
Definition: apr_allocator.h:41
APR Standard Headers Support.
apr_size_t apr_pool_num_bytes(apr_pool_t *p, int recurse)
APR Miscellaneous library routines.
int(* apr_abortfunc_t)(int retcode)
Definition: apr_pools.h:148
apr_status_t apr_pool_cleanup_run(apr_pool_t *p, void *data, apr_status_t(*cleanup)(void *))
void apr_pool_cleanup_kill(apr_pool_t *p, const void *data, apr_status_t(*cleanup)(void *))
void apr_pool_pre_cleanup_register(apr_pool_t *p, const void *data, apr_status_t(*plain_cleanup)(void *))
void * apr_palloc(apr_pool_t *p, apr_size_t size)
apr_status_t apr_pool_create_ex(apr_pool_t **newpool, apr_pool_t *parent, apr_abortfunc_t abort_fn, apr_allocator_t *allocator)
apr_status_t apr_pool_create_core(apr_pool_t **newpool)
APR Platform Definitions.
void apr_pool_clear(apr_pool_t *p)
apr_status_t apr_pool_userdata_setn(const void *data, const char *key, apr_status_t(*cleanup)(void *), apr_pool_t *pool)
void apr_pool_destroy_debug(apr_pool_t *p, const char *file_line)
void apr_pool_abort_set(apr_abortfunc_t abortfunc, apr_pool_t *pool)
void apr_pool_clear_debug(apr_pool_t *p, const char *file_line)
apr_status_t apr_pool_create_unmanaged_ex(apr_pool_t **newpool, apr_abortfunc_t abort_fn, apr_allocator_t *allocator)
void apr_pool_child_cleanup_set(apr_pool_t *p, const void *data, apr_status_t(*plain_cleanup)(void *), apr_status_t(*child_cleanup)(void *))
apr_pool_t * apr_pool_find(const void *mem)
apr_allocator_t * apr_pool_allocator_get(apr_pool_t *pool)
apr_status_t apr_pool_cleanup_null(void *data)
struct apr_pool_t apr_pool_t
Definition: apr_pools.h:60
void apr_pool_cleanup_register(apr_pool_t *p, const void *data, apr_status_t(*plain_cleanup)(void *), apr_status_t(*child_cleanup)(void *))
int apr_status_t
Definition: apr_errno.h:44
apr_status_t apr_pool_userdata_get(void **data, const char *key, apr_pool_t *pool)
apr_status_t apr_pool_initialize(void)
void apr_pool_join(apr_pool_t *p, apr_pool_t *sub)
apr_abortfunc_t apr_pool_abort_get(apr_pool_t *pool)
int apr_pool_is_ancestor(apr_pool_t *a, apr_pool_t *b)
void * apr_palloc_debug(apr_pool_t *p, apr_size_t size, const char *file_line)
apr_status_t apr_pool_create(apr_pool_t **newpool, apr_pool_t *parent)
apr_status_t apr_pool_create_unmanaged_ex_debug(apr_pool_t **newpool, apr_abortfunc_t abort_fn, apr_allocator_t *allocator, const char *file_line)