~avsej/libmemcached/touch-command

« back to all changes in this revision

Viewing changes to docs/man/memcached_memory_allocators.3

  • Committer: Brian Aker
  • Date: 2011-05-24 20:43:14 UTC
  • mfrom: (929.1.110 libmemcached-build)
  • Revision ID: brian@tangent.org-20110524204314-9ag1kkk4c1a6b3z3
Merge in local trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.TH "MEMCACHED_MEMORY_ALLOCATORS" "3" "April 14, 2011" "0.47" "libmemcached"
 
1
.TH "MEMCACHED_MEMORY_ALLOCATORS" "3" "May 23, 2011" "0.47" "libmemcached"
2
2
.SH NAME
3
3
memcached_memory_allocators \- libmemcached Documentation
4
4
.
32
32
.
33
33
.sp
34
34
Manage memory allocator functions
35
 
.SH LIBRARY
36
 
.sp
37
 
C Client Library for memcached (libmemcached, \-lmemcached)
38
35
.SH SYNOPSIS
39
36
.sp
40
 
.nf
41
 
.ft C
42
37
#include <libmemcached/memcached.h>
43
 
 
44
 
memcached_return_t 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);
45
 
 
46
 
void 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);
47
 
 
48
 
void * memcached_get_memory_allocators_context(const memcached_st *ptr);
49
 
 
50
 
void * (*memcached_malloc_fn) (memcached_st *ptr, const size_t size, void *context);
51
 
 
52
 
void * (*memcached_realloc_fn) (memcached_st *ptr, void *mem, const size_t size, void *context);
53
 
 
54
 
void (*memcached_free_fn) (memcached_st *ptr, void *mem, void *context);
55
 
 
56
 
void * (*memcached_calloc_fn) (memcached_st *ptr, size_t nelem, const size_t elsize, void *context);
57
 
.ft P
58
 
.fi
 
38
.INDENT 0.0
 
39
.TP
 
40
.B memcached_return_t 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);
 
41
.UNINDENT
 
42
.INDENT 0.0
 
43
.TP
 
44
.B void 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);
 
45
.UNINDENT
 
46
.INDENT 0.0
 
47
.TP
 
48
.B void * memcached_get_memory_allocators_context(const memcached_st *ptr);
 
49
.UNINDENT
 
50
.INDENT 0.0
 
51
.TP
 
52
.B void * (*memcached_malloc_fn) (memcached_st *ptr, const size_t size, void *context);
 
53
.UNINDENT
 
54
.INDENT 0.0
 
55
.TP
 
56
.B void * (*memcached_realloc_fn) (memcached_st *ptr, void *mem, const size_t size, void *context);
 
57
.UNINDENT
 
58
.INDENT 0.0
 
59
.TP
 
60
.B void (*memcached_free_fn) (memcached_st *ptr, void *mem, void *context);
 
61
.UNINDENT
 
62
.INDENT 0.0
 
63
.TP
 
64
.B void * (*memcached_calloc_fn) (memcached_st *ptr, size_t nelem, const size_t elsize, void *context);
 
65
.UNINDENT
 
66
.sp
 
67
Compile and link with \-lmemcached
59
68
.SH DESCRIPTION
60
69
.sp
61
 
libmemcached(3) allows you to specify your own memory allocators optimized
 
70
libmemcached(3) allows you to specify your own memory allocators, optimized
62
71
for your application. This enables libmemcached to be used inside of applications that have their own malloc implementation.
63
72
.sp
64
73
memcached_set_memory_allocators() is used to set the memory allocators used