X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fallocators.h;h=c87cd2ec42486295104270b3d8445e6662483817;hb=a81bddebd55105aefa57af7cc87adbda3d1a022e;hp=d22bc65235d23b1d23c5b61de86eecba48feb50b;hpb=8f36e509f6130022162abf7cde7e6c8acbbe224c;p=awesomized%2Flibmemcached diff --git a/libmemcached/allocators.h b/libmemcached/allocators.h index d22bc652..c87cd2ec 100644 --- a/libmemcached/allocators.h +++ b/libmemcached/allocators.h @@ -21,15 +21,34 @@ memcached_return_t memcached_set_memory_allocators(memcached_st *ptr, memcached_malloc_fn mem_malloc, memcached_free_fn mem_free, memcached_realloc_fn mem_realloc, - memcached_calloc_fn mem_calloc); + memcached_calloc_fn mem_calloc, + void *context); LIBMEMCACHED_API -void memcached_get_memory_allocators(memcached_st *ptr, +void memcached_get_memory_allocators(const memcached_st *ptr, memcached_malloc_fn *mem_malloc, memcached_free_fn *mem_free, memcached_realloc_fn *mem_realloc, memcached_calloc_fn *mem_calloc); +LIBMEMCACHED_API +void *memcached_get_memory_allocators_context(const memcached_st *ptr); + +LIBMEMCACHED_LOCAL +void _libmemcached_free(const memcached_st *ptr, void *mem, void *context); + +LIBMEMCACHED_LOCAL +void *_libmemcached_malloc(const memcached_st *ptr, const size_t size, void *context); + +LIBMEMCACHED_LOCAL +void *_libmemcached_realloc(const memcached_st *ptr, void *mem, const size_t size, void *context); + +LIBMEMCACHED_LOCAL +void *_libmemcached_calloc(const memcached_st *ptr, size_t nelem, size_t size, void *context); + +LIBMEMCACHED_LOCAL +struct _allocators_st memcached_allocators_return_default(void); + #ifdef __cplusplus }