| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
@deftypefun {void} {gnutls_global_set_mem_functions} (gnutls_alloc_function @var{alloc_func}, gnutls_alloc_function @var{secure_alloc_func}, gnutls_is_secure_function @var{is_secure_func}, gnutls_realloc_function @var{realloc_func}, gnutls_free_function @var{free_func}) |
| 6 |
@var{alloc_func}: it's the default memory allocation function. Like @code{malloc()} . |
| 7 |
|
| 8 |
@var{secure_alloc_func}: This is the memory allocation function that will be used for sensitive data. |
| 9 |
|
| 10 |
@var{is_secure_func}: a function that returns 0 if the memory given is not secure. May be NULL. |
| 11 |
|
| 12 |
@var{realloc_func}: A realloc function |
| 13 |
|
| 14 |
@var{free_func}: The function that frees allocated data. Must accept a NULL pointer. |
| 15 |
|
| 16 |
|
| 17 |
@strong{Deprecated:} since 3.3.0 it is no longer possible to replace the internally used |
| 18 |
memory allocation functions |
| 19 |
|
| 20 |
This is the function where you set the memory allocation functions |
| 21 |
gnutls is going to use. By default the libc's allocation functions |
| 22 |
(@code{malloc()} , @code{free()} ), are used by gnutls, to allocate both sensitive |
| 23 |
and not sensitive data. This function is provided to set the |
| 24 |
memory allocation functions to something other than the defaults |
| 25 |
|
| 26 |
This function must be called before @code{gnutls_global_init()} is called. |
| 27 |
This function is not thread safe. |
| 28 |
@end deftypefun |