1MEMCACHED_CLONE(3) libmemcached MEMCACHED_CLONE(3)
2
3
4
6 memcached_clone - libmemcached Documentation
7
9 #include <libmemcached/memcached.h>
10
11 memcached_st
12
13 memcached_st* memcached_create(memcached_st *ptr)
14
15 void memcached_free(memcached_st *ptr)
16
17 memcached_st* memcached_clone(memcached_st *destination,
18 memcached_st *source)
19
20 void memcached_servers_reset(memcached_st)
21
22 Compile and link with -lmemcached
23
25 memcached_create() is used to create a memcached_st structure that will
26 then be used by other libmemcached(3) functions to communicate with the
27 server. You should either pass a statically declared memcached_st to
28 memcached_create() or a NULL. If a NULL passed in then a structure is
29 allocated for you.
30
31 Please note, when you write new application use memcached() over
32 memcached_create().
33
34 memcached_clone() is similar to memcached_create() but it copies the
35 defaults and list of servers from the source memcached_st. If you pass
36 a null as the argument for the source to clone, it is the same as a
37 call to memcached_create(). If the destination argument is NULL a
38 memcached_st will be allocated for you.
39
40 memcached_servers_reset() allows you to zero out the list of servers
41 that the memcached_st has.
42
43 To clean up memory associated with a memcached_st structure you should
44 pass it to memcached_free() when you are finished using it.
45 memcached_free() is the only way to make sure all memory is deallocated
46 when you finish using the structure.
47
48 You may wish to avoid using memcached_create(3) or memcached_clone(3)
49 with a stack based allocation. The most common issues related to ABI
50 safety involve heap allocated structures.
51
53 memcached_create() returns a pointer to the memcached_st that was cre‐
54 ated (or initialized). On an allocation failure, it returns NULL.
55
56 memcached_clone() returns a pointer to the memcached_st that was cre‐
57 ated (or initialized). On an allocation failure, it returns NULL.
58
60 To find out more information please check: http://libmemcached.org/
61
63 memcached(1) libmemcached(3) memcached_strerror(3)
64
66 Brian Aker
67
69 2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
70
71
72
73
741.0.18 February 09, 2014 MEMCACHED_CLONE(3)