}
void *_libmemcached_realloc(const memcached_st*, void *mem, size_t size, void *)
{
}
void *_libmemcached_realloc(const memcached_st*, void *mem, size_t size, void *)
{
}
void *_libmemcached_calloc(const memcached_st *self, size_t nelem, size_t size, void *context)
{
if (self->allocators.malloc != _libmemcached_malloc)
{
}
void *_libmemcached_calloc(const memcached_st *self, size_t nelem, size_t size, void *context)
{
if (self->allocators.malloc != _libmemcached_malloc)
{
memcached_malloc_fn mem_malloc,
memcached_free_fn mem_free,
memcached_realloc_fn mem_realloc,
memcached_calloc_fn mem_calloc,
void *context)
{
memcached_malloc_fn mem_malloc,
memcached_free_fn mem_free,
memcached_realloc_fn mem_realloc,
memcached_calloc_fn mem_calloc,
void *context)
{
memcached_malloc_fn *mem_malloc,
memcached_free_fn *mem_free,
memcached_realloc_fn *mem_realloc,
memcached_calloc_fn *mem_calloc)
{
memcached_malloc_fn *mem_malloc,
memcached_free_fn *mem_free,
memcached_realloc_fn *mem_realloc,
memcached_calloc_fn *mem_calloc)
{
- *mem_malloc= self->allocators.malloc;
- *mem_free= self->allocators.free;
- *mem_realloc= self->allocators.realloc;
- *mem_calloc= self->allocators.calloc;
+ const Memcached* self= memcached2Memcached(shell);
+ if (self)
+ {
+ if (mem_malloc)
+ {
+ *mem_malloc= self->allocators.malloc;
+ }
+
+ if (mem_free)
+ {
+ *mem_free= self->allocators.free;
+ }
+
+ if (mem_realloc)
+ {
+ *mem_realloc= self->allocators.realloc;
+ }
+
+ if (mem_calloc)
+ {
+ *mem_calloc= self->allocators.calloc;
+ }
+ }