Lines Matching refs:pool

12 	struct pool pool;
34 static const char *pool_allocfree_get_name(pool_t pool);
35 static void pool_allocfree_ref(pool_t pool);
36 static void pool_allocfree_unref(pool_t *pool);
37 static void *pool_allocfree_malloc(pool_t pool, size_t size);
38 static void pool_allocfree_free(pool_t pool, void *mem);
39 static void *pool_allocfree_realloc(pool_t pool, void *mem,
41 static void pool_allocfree_clear(pool_t pool);
42 static size_t pool_allocfree_get_max_easy_alloc_size(pool_t pool);
59 static const struct pool static_allocfree_pool = {
68 struct allocfree_pool *pool;
69 pool = calloc(1, SIZEOF_ALLOCFREE_POOL);
70 if (pool == NULL)
74 pool->name = strdup(name);
76 pool->pool = static_allocfree_pool;
77 pool->refcount = 1;
78 return &pool->pool;
84 pool_t pool;
86 pool = pool_allocfree_create(name);
87 apool = (struct allocfree_pool *)pool;
89 return pool;
94 pool_allocfree_clear(&apool->pool);
103 static const char *pool_allocfree_get_name(pool_t pool ATTR_UNUSED)
107 container_of(pool, struct allocfree_pool, pool);
114 static void pool_allocfree_ref(pool_t pool)
117 container_of(pool, struct allocfree_pool, pool);
125 pool_t pool = *_pool;
127 container_of(pool, struct allocfree_pool, pool);
131 exist inside the pool's memory area */
169 static void *pool_allocfree_malloc(pool_t pool, size_t size)
172 container_of(pool, struct allocfree_pool, pool);
185 static void pool_allocfree_free(pool_t pool, void *mem)
188 container_of(pool, struct allocfree_pool, pool);
197 static void *pool_allocfree_realloc(pool_t pool, void *mem,
201 container_of(pool, struct allocfree_pool, pool);
208 return pool_allocfree_malloc(pool, new_size);
224 static void pool_allocfree_clear(pool_t pool)
227 container_of(pool, struct allocfree_pool, pool);
232 pool_allocfree_free(pool, block->block);
237 static size_t pool_allocfree_get_max_easy_alloc_size(pool_t pool ATTR_UNUSED)
242 size_t pool_allocfree_get_total_used_size(pool_t pool)
245 container_of(pool, struct allocfree_pool, pool);
249 size_t pool_allocfree_get_total_alloc_size(pool_t pool)
252 container_of(pool, struct allocfree_pool, pool);