X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=libmemcached%2Fmemcached_memory_allocators.html;h=870f0f0aa63b8666607a656b6d83c16bcad6bcef;hb=ec0598837ed468aa8e633d5b6a08e12f8614a8d2;hp=c7dd14a7d89ddf13bdae08ff230aad8c5f70993e;hpb=d517b40976d8e986cada6b8b896e8f12cd179fa6;p=awesomized%2Flibmemcached diff --git a/libmemcached/memcached_memory_allocators.html b/libmemcached/memcached_memory_allocators.html index c7dd14a7..870f0f0a 100644 --- a/libmemcached/memcached_memory_allocators.html +++ b/libmemcached/memcached_memory_allocators.html @@ -8,7 +8,7 @@ -
Manage memory allocator functions
Compile and link with -lmemcached
-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, void *context)¶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, void *context)¶Parameters: |
|
+
---|---|
Returns: |
|
+
memcached_get_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_get_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)¶Parameters: |
|
+
---|
memcached_get_memory_allocators_context
(const memcached_st *ptr)¶memcached_get_memory_allocators_context
(const memcached_st *ptr)¶Parameters: | ptr -- pointer to an initialized memcached_st struct |
+
---|---|
Returns: | pointer to the user supplied context | +
memcached_malloc_fn
)(memcached_st *ptr, const size_t size, void *context)¶memcached_malloc_fn
)(memcached_st *ptr, const size_t size, void *context)¶Parameters: |
|
+
---|---|
Returns: | pointer to at least |
+
memcached_realloc_fn
)(memcached_st *ptr, void *mem, const size_t size, void *context)¶memcached_realloc_fn
)(memcached_st *ptr, void *mem, const size_t size, void *context)¶Parameters: |
|
+
---|---|
Returns: | pointer to at least |
+
memcached_free_fn
)(memcached_st *ptr, void *mem, void *context)¶memcached_free_fn
)(memcached_st *ptr, void *mem, void *context)¶Parameters: |
|
+
---|
memcached_calloc_fn
)(memcached_st *ptr, size_t nelem, const size_t elsize, void *context)¶memcached_calloc_fn
)(memcached_st *ptr, size_t nelem, const size_t elsize, void *context)¶Parameters: |
|
+
---|---|
Returns: | pointer to at least |
+
In version 0.38 all functions were modified to have a context void pointer -passed to them. This was so that customer allocators could have their own space +passed to them. This was so that custom allocators could have their own space for memory.
memcached_set_memory_allocators()
return MEMCACHED_SUCCESS
upon success,
+
memcached_set_memory_allocators()
returns MEMCACHED_SUCCESS
upon success,
and MEMCACHED_FAILURE
if you don't pass a complete set of function pointers.