Lines Matching refs:mem
56 static void pool_alloconly_free(pool_t pool, void *mem);
57 static void *pool_alloconly_realloc(pool_t pool, void *mem,
269 void *mem;
286 mem = POOL_BLOCK_DATA(apool->block) +
292 memcpy(mem, &size, sizeof(size));
293 mem = PTR_OFFSET(mem, MEM_ALIGN(sizeof(size)));
295 memset(PTR_OFFSET(mem, size), CLEAR_CHR,
298 return mem;
301 static void pool_alloconly_free(pool_t pool, void *mem)
308 apool->block->last_alloc_size) == mem) {
309 memset(mem, 0, apool->block->last_alloc_size);
315 static bool pool_try_grow(struct alloconly_pool *apool, void *mem, size_t size)
320 apool->block->last_alloc_size) == mem) {
334 static void *pool_alloconly_realloc(pool_t pool, void *mem,
343 if (mem == NULL)
347 return mem;
352 if (!pool_try_grow(apool, mem, new_size)) {
355 memcpy(new_mem, mem, old_size);
356 mem = new_mem;
359 return mem;