2 * Copyright (C) 2010 Brian Aker
5 * Use and distribution licensed under the BSD license. See
6 * the COPYING file in the parent directory for full text.
8 * Summary: work with user defined memory allocators
12 #ifndef __MEMCACHED_ALLOCATORS_H__
13 #define __MEMCACHED_ALLOCATORS_H__
20 memcached_return_t
memcached_set_memory_allocators(memcached_st
*ptr
,
21 memcached_malloc_fn mem_malloc
,
22 memcached_free_fn mem_free
,
23 memcached_realloc_fn mem_realloc
,
24 memcached_calloc_fn mem_calloc
);
27 void memcached_get_memory_allocators(const memcached_st
*ptr
,
28 memcached_malloc_fn
*mem_malloc
,
29 memcached_free_fn
*mem_free
,
30 memcached_realloc_fn
*mem_realloc
,
31 memcached_calloc_fn
*mem_calloc
);
34 void libmemcached_free(const memcached_st
*ptr
, void *mem
);
37 void *libmemcached_malloc(const memcached_st
*ptr
, const size_t size
);
40 void *libmemcached_realloc(const memcached_st
*ptr
, void *mem
, const size_t size
);
43 void *libmemcached_calloc(const memcached_st
*ptr
, size_t nelem
, size_t size
);
50 #endif /* __MEMCACHED_ALLOCATORS_H__ */