X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fmemcached_memory_allocators.html;h=645dc5b77d0b71680505877b2b65e80116cc626d;hb=29c4799b4f4859086983891f7651f2636ff94270;hp=c7dd14a7d89ddf13bdae08ff230aad8c5f70993e;hpb=d517b40976d8e986cada6b8b896e8f12cd179fa6;p=awesomized%2Flibmemcached diff --git a/libmemcached/memcached_memory_allocators.html b/libmemcached/memcached_memory_allocators.html index c7dd14a7..645dc5b7 100644 --- a/libmemcached/memcached_memory_allocators.html +++ b/libmemcached/memcached_memory_allocators.html @@ -21,10 +21,10 @@ - - - - + + + + @@ -36,7 +36,7 @@ - + @@ -85,8 +85,7 @@ -
libmemcached
-libmemcachedutil
- -libhashkit
- -Client Applications
- -Copyright
@@ -185,6 +173,10 @@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.