2 * UCW Library -- Configuration files: memory allocation
4 * (c) 2001--2006 Robert Spalek <robert@ucw.cz>
5 * (c) 2003--2012 Martin Mares <mj@ucw.cz>
7 * This software may be freely distributed and used according to the terms
8 * of the GNU Lesser General Public License.
13 #include <ucw/conf-internal.h>
14 #include <ucw/mempool.h>
16 inline struct mempool *
19 return cf_get_context()->pool;
25 return mp_alloc(cf_get_pool(), size);
29 cf_malloc_zero(uns size)
31 return mp_alloc_zero(cf_get_pool(), size);
35 cf_strdup(const char *s)
37 return mp_strdup(cf_get_pool(), s);
41 cf_printf(const char *fmt, ...)
45 char *res = mp_vprintf(cf_get_pool(), fmt, args);