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)));
225 __attribute__((nonnull(1)));
247 const
char *file_line)
248 __attribute__((nonnull(1)));
251 #define apr_pool_create_ex(newpool, parent, abort_fn, allocator) \
252 apr_pool_create_ex_debug(newpool, parent, abort_fn, allocator, \
253 APR_POOL__FILE_LINE__)
263 const
char *file_line);
283 const
char *file_line)
284 __attribute__((nonnull(1)));
287 #define apr_pool_create_core_ex(newpool, abort_fn, allocator) \
288 apr_pool_create_unmanaged_ex_debug(newpool, abort_fn, allocator, \
289 APR_POOL__FILE_LINE__)
291 #define apr_pool_create_unmanaged_ex(newpool, abort_fn, allocator) \
292 apr_pool_create_unmanaged_ex_debug(newpool, abort_fn, allocator, \
293 APR_POOL__FILE_LINE__)
314 #define apr_pool_create(newpool, parent) \
315 apr_pool_create_ex_debug(newpool, parent, NULL, NULL, \
316 APR_POOL__FILE_LINE__)
318 #define apr_pool_create(newpool, parent) \
319 apr_pool_create_ex(newpool, parent, NULL, NULL)
332 #define apr_pool_create_core(newpool) \
333 apr_pool_create_unmanaged_ex_debug(newpool, NULL, NULL, \
334 APR_POOL__FILE_LINE__)
335 #define apr_pool_create_unmanaged(newpool) \
336 apr_pool_create_unmanaged_ex_debug(newpool, NULL, NULL, \
337 APR_POOL__FILE_LINE__)
339 #define apr_pool_create_core(newpool) \
340 apr_pool_create_unmanaged_ex(newpool, NULL, NULL)
341 #define apr_pool_create_unmanaged(newpool) \
342 apr_pool_create_unmanaged_ex(newpool, NULL, NULL)
351 __attribute__((nonnull(1)));
377 const
char *file_line)
378 __attribute__((nonnull(1)));
381 #define apr_pool_clear(p) \
382 apr_pool_clear_debug(p, APR_POOL__FILE_LINE__)
407 const
char *file_line)
408 __attribute__((nonnull(1)));
411 #define apr_pool_destroy(p) \
412 apr_pool_destroy_debug(p, APR_POOL__FILE_LINE__)
427 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
428 __attribute__((alloc_size(2)))
430 __attribute__((nonnull(1)));
441 const
char *file_line)
442 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
443 __attribute__((alloc_size(2)))
445 __attribute__((nonnull(1)));
448 #define apr_palloc(p, size) \
449 apr_palloc_debug(p, size, APR_POOL__FILE_LINE__)
460 #elif !APR_POOL_DEBUG
461 #define apr_pcalloc(p, size) memset(apr_palloc(p, size), 0, size)
473 const
char *file_line)
474 __attribute__((nonnull(1)));
477 #define apr_pcalloc(p, size) \
478 apr_pcalloc_debug(p, size, APR_POOL__FILE_LINE__)
496 __attribute__((nonnull(2)));
504 __attribute__((nonnull(1)));
512 __attribute__((nonnull(1)));
533 __attribute__((nonnull(1)));
563 __attribute__((nonnull(2,4)));
585 const
void *data, const
char *key,
588 __attribute__((nonnull(2,4)));
598 __attribute__((nonnull(1,2,3)));
628 __attribute__((nonnull(3,4)));
645 __attribute__((nonnull(3)));
661 __attribute__((nonnull(3)));
679 __attribute__((nonnull(3,4)));
694 __attribute__((nonnull(3)));
757 #if APR_POOL_DEBUG || defined(DOXYGEN)
764 __attribute__((nonnull(2)));
780 __attribute__((nonnull(1)));
796 #define apr_pool_join(a,b)
801 #define apr_pool_lock(pool, lock)