Lines Matching refs:pool
1 /* $NetBSD: pool.h,v 1.1.1.1 2008/12/22 00:18:35 haad Exp $ */
25 * The pool allocator is useful when you are going to allocate
30 * You should think of the pool as an infinite, contiguous chunk
47 * compiler). You can create yourself a pool, allocate the nodes
54 * single arbitrary node with pool.
57 struct pool;
60 struct pool *pool_create(const char *name, size_t chunk_hint);
61 void pool_destroy(struct pool *p);
64 void *pool_alloc(struct pool *p, size_t s);
65 void *pool_alloc_aligned(struct pool *p, size_t s, unsigned alignment);
66 void pool_empty(struct pool *p);
67 void pool_free(struct pool *p, void *ptr);
78 * char *build_string(struct pool *mem)
113 int pool_begin_object(struct pool *p, size_t hint);
114 int pool_grow_object(struct pool *p, const void *extra, size_t delta);
115 void *pool_end_object(struct pool *p);
116 void pool_abandon_object(struct pool *p);
119 char *pool_strdup(struct pool *p, const char *str);
120 char *pool_strndup(struct pool *p, const char *str, size_t n);
121 void *pool_zalloc(struct pool *p, size_t s);