1..::docs::memcached_memory_allocatloirbsm(e3m.)c.a:c:hdeodcs::memcached_memory_allocators(3)
2
3
4

NAME

6       memcached_set_memory_allocators, memcached_get_memory_allocators
7

LIBRARY

9       C Client Library for memcached (libmemcached, -lmemcached)
10

SYNOPSIS

12         #include <memcached.h>
13
14         memcached_return
15           memcached_set_memory_allocators(memcached_st *ptr,
16                                           memcached_malloc_function mem_malloc,
17                                           memcached_free_function mem_free,
18                                           memcached_realloc_function mem_realloc,
19                                           memcached_calloc_function mem_calloc);
20
21         void memcached_get_memory_allocators(memcached_st *ptr,
22                                              memcached_malloc_function *mem_malloc,
23                                              memcached_free_function *mem_free,
24                                              memcached_realloc_function *mem_realloc,
25                                              memcached_calloc_function *mem_calloc);
26
27         void *(*memcached_malloc_function)(memcached_st *ptr, const size_t size);
28         void *(*memcached_realloc_function)(memcached_st *ptr, void *mem,
29                                             const size_t size);
30         void  (*memcached_free_function)(memcached_st *ptr, void *mem);
31         void *(*memcached_calloc_function)(memcached_st *ptr, size_t nelem,
32                                            const size_t elsize);
33

DESCRIPTION

35       libmemcached(3) allows you to specify your own memory allocators
36       optimized for your application.
37
38       memcached_set_memory_allocators() is used to set the memory allocators
39       used by the memcached instance specified by ptr. Please note that you
40       cannot override only one of the memory allocators, you have to specify
41       a complete new set if you want to override one of them. All of the
42       memory allocation functions should behave as specified in the C99
43       standard. Specify NULL as all functions to reset them to the default
44       values.
45
46       memcached_get_memory_allocators() is used to get the currently used
47       memory allocators by a mamcached handle.
48
49       The first argument to the memory allocator functions is a pointer to a
50       memcached structure, and you may use the memcached_set_user_data() and
51       memcached_get_user_data() to store a user-specific value to each
52       memcached structure.
53

RETURN

55       memcached_set_memory_allocators() return MEMCACHED_SUCCESS upon
56       success, and MEMCACHED_FAILURE if you don't pass a complete set of
57       function pointers.
58

HOME

60       To find out more information please check:
61       <http://tangent.org/552/libmemcached.html>
62

AUTHOR

64       Trond Norbye, <trond.norbye@sun.com>
65

SEE ALSO

67       memcached(1) libmemcached(3) memcached_get_user_data(3)
68       memcached_set_user_data(3)
69
70
71
72                                  2009-.0.6:-:1d4ocs::memcached_memory_allocators(3)
Impressum