Small style cleanup.
[m6w6/libmemcached] / libmemcached / allocators.h
1 /* LibMemcached
2 * Copyright (C) 2010 Brian Aker
3 * All rights reserved.
4 *
5 * Use and distribution licensed under the BSD license. See
6 * the COPYING file in the parent directory for full text.
7 *
8 * Summary: work with user defined memory allocators
9 *
10 */
11
12 #ifndef __MEMCACHED_ALLOCATORS_H__
13 #define __MEMCACHED_ALLOCATORS_H__
14
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18
19 LIBMEMCACHED_API
20 memcached_return_t memcached_set_memory_allocators(memcached_st *ptr,
21 memcached_malloc_fn mem_malloc,
22 memcached_free_fn mem_free,
23 memcached_realloc_fn mem_realloc,
24 memcached_calloc_fn mem_calloc);
25
26 LIBMEMCACHED_API
27 void memcached_get_memory_allocators(const memcached_st *ptr,
28 memcached_malloc_fn *mem_malloc,
29 memcached_free_fn *mem_free,
30 memcached_realloc_fn *mem_realloc,
31 memcached_calloc_fn *mem_calloc);
32
33 LIBMEMCACHED_LOCAL
34 void libmemcached_free(const memcached_st *ptr, void *mem);
35
36 LIBMEMCACHED_LOCAL
37 void *libmemcached_malloc(const memcached_st *ptr, const size_t size);
38
39 LIBMEMCACHED_LOCAL
40 void *libmemcached_realloc(const memcached_st *ptr, void *mem, const size_t size);
41
42 LIBMEMCACHED_LOCAL
43 void *libmemcached_calloc(const memcached_st *ptr, size_t nelem, size_t size);
44
45
46 #ifdef __cplusplus
47 }
48 #endif
49
50 #endif /* __MEMCACHED_ALLOCATORS_H__ */