[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

12. Utilities

12.1 Memory allocation  Functions related with memory allocation.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

12.1 Memory allocation

Function: void *gcry_malloc (size_t n)

This function tries to allocate n bytes of memory. On success it returns a pointer to the memory area, in an out-of-core condition, it returns NULL.

Function: void *gcry_malloc_secure (size_t n)
Like gcry_malloc, but uses secure memory.

Function: void *gcry_calloc (size_t n)

This function tries to allocate n bytes of cleared memory (i.e. memory that is initialized with zero bytes). On success it returns a pointer to the memory area, in an out-of-core condition, it returns NULL.

Function: void *gcry_calloc_secure (size_t n)
Like gcry_calloc, but uses secure memory.

Function: void *gcry_realloc (void *p, size_t n)

This function tries to resize the memory area pointed to by p to n bytes. On success it returns a pointer to the new memory area, in an out-of-core condition, it returns NULL. Depending on wether the memory pointed to by p is secure memory or not, gcry_realloc tries to use secure memory as well.

Function: void gcry_free (void *p)
Release the memory area pointed to by p.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by root on April, 16 2004 using texi2html