1gnutls_global_set_mem_functions(3) gnutls gnutls_global_set_mem_functions(3)
2
3
4
6 gnutls_global_set_mem_functions - This function sets the memory alloca‐
7 tion functions
8
10 #include <gnutls/gnutls.h>
11
12 void gnutls_global_set_mem_functions(gnutls_alloc_function alloc_func,
13 gnutls_alloc_function secure_alloc_func, gnutls_is_secure_function
14 is_secure_func, gnutls_realloc_function realloc_func, gnutls_free_func‐
15 tion free_func);
16
18 gnutls_alloc_function alloc_func
19 it's the default memory allocation function. Like malloc().
20
21 gnutls_alloc_function secure_alloc_func
22 This is the memory allocation function that will be used
23 for sensitive data.
24
25 gnutls_is_secure_function is_secure_func
26 a function that returns 0 if the memory given is not
27 secure. May be NULL.
28
29 gnutls_realloc_function realloc_func
30 A realloc function
31
32 gnutls_free_function free_func
33 The function that frees allocated data. Must accept a NULL
34 pointer.
35
37 This is the function were you set the memory allocation functions
38 gnutls is going to use. By default the libc's allocation functions
39 (malloc(), free()), are used by gnutls, to allocate both sensitive and
40 not sensitive data. This function is provided to set the memory allo‐
41 cation functions to something other than the defaults (ie the gcrypt
42 allocation functions).
43
44 This function must be called before gnutls_global_init() is called.
45
47 Report bugs to <bug-gnutls@gnu.org>.
48
50 Copyright © 2006 Free Software Foundation.
51 Permission is granted to make and distribute verbatim copies of this
52 manual provided the copyright notice and this permission notice are
53 preserved on all copies.
54
56 The full documentation for gnutls is maintained as a Texinfo manual.
57 If the info and gnutls programs are properly installed at your site,
58 the command
59
60 info gnutls
61
62 should give you access to the complete manual.
63
64
65
66gnutls 1.6.3 gnutls_global_set_mem_functions(3)