1gnutls_global_set_mem_functions(3)  gnutls  gnutls_global_set_mem_functions(3)
2
3
4

NAME

6       gnutls_global_set_mem_functions - set the memory allocation functions
7

SYNOPSIS

9       #include <gnutls/gnutls.h>
10
11       void  gnutls_global_set_mem_functions(gnutls_alloc_function alloc_func,
12       gnutls_alloc_function   secure_alloc_func,    gnutls_is_secure_function
13       is_secure_func, gnutls_realloc_function realloc_func, gnutls_free_func‐
14       tion free_func);
15

ARGUMENTS

17       gnutls_alloc_function alloc_func
18                   it's the default memory allocation function. Like malloc().
19
20       gnutls_alloc_function secure_alloc_func
21                   This is the memory allocation function that  will  be  used
22                   for sensitive data.
23
24       gnutls_is_secure_function is_secure_func
25                   a  function  that  returns  0  if  the  memory given is not
26                   secure. May be NULL.
27
28       gnutls_realloc_function realloc_func
29                   A realloc function
30
31       gnutls_free_function free_func
32                   The function that frees allocated data. Must accept a  NULL
33                   pointer.
34

DESCRIPTION

36       This  is  the  function  were  you  set the memory allocation functions
37       gnutls is going to use. By  default  the  libc's  allocation  functions
38       (malloc(),  free()), are used by gnutls, to allocate both sensitive and
39       not sensitive data.  This function is provided to set the memory  allo‐
40       cation  functions  to  something other than the defaults (ie the gcrypt
41       allocation functions).
42
43       This function must be called  before  gnutls_global_init()  is  called.
44       This function is not thread safe.
45

REPORTING BUGS

47       Report    bugs    to    <bug-gnutls@gnu.org>.     GnuTLS   home   page:
48       http://www.gnu.org/software/gnutls/ General help  using  GNU  software:
49       http://www.gnu.org/gethelp/
50
52       Copyright © 2008 Free Software Foundation.
53       Copying  and  distribution  of this file, with or without modification,
54       are permitted in any medium  without  royalty  provided  the  copyright
55       notice and this notice are preserved.
56

SEE ALSO

58       The  full  documentation  for gnutls is maintained as a Texinfo manual.
59       If the info and gnutls programs are properly installed  at  your  site,
60       the command
61
62              info gnutls
63
64       should give you access to the complete manual.
65
66
67
68gnutls                               2.8.6  gnutls_global_set_mem_functions(3)
Impressum