1 .TH "MEMCACHED_CREATE" "3" "July 31, 2012" "1.0.10" "libmemcached"
3 memcached_create \- libmemcached Documentation
5 .nr rst2man-indent-level 0
9 level \\n[rst2man-indent-level]
10 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
17 .\" .rstReportMargin pre:
19 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
20 . nr rst2man-indent-level +1
21 .\" .rstReportMargin post:
25 .\" indent \\n[an-margin]
26 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
27 .nr rst2man-indent-level -1
28 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
29 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
31 .\" Man page generated from reStructeredText.
35 #include <libmemcached/memcached.h>
42 .B \fI\%memcached_st\fP* memcached_create(\fI\%memcached_st\fP\fI\ *ptr\fP)
46 .B void memcached_free(\fI\%memcached_st\fP\fI\ *ptr\fP)
50 .B \fI\%memcached_st\fP* memcached_clone(\fI\%memcached_st\fP\fI\ *destination\fP, \fI\%memcached_st\fP\fI\ *source\fP)
54 .B void memcached_servers_reset(\fI\%memcached_st\fP)
57 Compile and link with \-lmemcached
60 \fI\%memcached_create()\fP is used to create a \fI\%memcached_st\fP
61 structure that will then be used by other libmemcached(3) functions to
62 communicate with the server. You should either pass a statically declared
63 \fI\%memcached_st\fP to \fI\%memcached_create()\fP or
64 a NULL. If a NULL passed in then a structure is allocated for you.
66 Please note, when you write new application use
67 \fBmemcached()\fP over \fI\%memcached_create()\fP.
69 \fI\%memcached_clone()\fP is similar to \fI\%memcached_create()\fP but
70 it copies the defaults and list of servers from the source
71 \fI\%memcached_st\fP. If you pass a null as the argument for the source
72 to clone, it is the same as a call to \fI\%memcached_create()\fP.
73 If the destination argument is NULL a \fI\%memcached_st\fP will be allocated
76 \fI\%memcached_servers_reset()\fP allows you to zero out the list of
77 servers that the \fI\%memcached_st\fP has.
79 To clean up memory associated with a \fI\%memcached_st\fP structure you
80 should pass it to \fI\%memcached_free()\fP when you are finished using it.
81 \fI\%memcached_free()\fP is the only way to make sure all memory is
82 deallocated when you finish using the structure.
84 You may wish to avoid using memcached_create(3) or memcached_clone(3) with a
85 stack based allocation. The most common issues related to ABI safety involve
86 heap allocated structures.
89 \fI\%memcached_create()\fP returns a pointer to the \fI\%memcached_st\fP
90 that was created (or initialized). On an allocation failure, it returns NULL.
92 \fI\%memcached_clone()\fP returns a pointer to the \fI\%memcached_st\fP
93 that was created (or initialized). On an allocation failure, it returns NULL.
96 To find out more information please check:
97 \fI\%http://libmemcached.org/\fP
100 \fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
104 2011, Brian Aker DataDifferential, http://datadifferential.com/
105 .\" Generated by docutils manpage writer.