SecureMalloc - Dynamic memory allocation module
[Non-specific low-level tools level]

Memory allocation handling functions (former monmalloc module). More...

Functions

void * secureMalloc (size_t size)
void * secureCalloc (size_t num, size_t size)
void * secureRealloc (void *memblock, size_t size)
void secureXFree (void *memblock)

Detailed Description

Memory allocation handling functions (former monmalloc module).

SlpTK Library 0.6.0

Required header
<securemalloc.h>
Author:
Jean-Cédric Chappelier (creation on 31.03.1999)

Antonin Merçay (revision on 19.11.2004)

Date:
2 March 2005
Version:
0.6.0

Function Documentation

void* secureCalloc ( size_t  num,
size_t  size 
)

Allocates an array in memory with elements initialized to 0 (redefine the standard calloc function). An error message is printed and the execution stopped if the allocation fails.

Parameters:
[in] num The number of elements
[in] size The length in bytes of each element
Returns:
The pointer to the allocated space
Former(s) function(s):
moncalloc

void* secureMalloc ( size_t  size  ) 

Allocates memory blocks (redefine the standard malloc function). An error message is printed and the execution stopped if the allocation fails.

Parameters:
[in] size The size of the block to allocate in bytes
Returns:
The pointer to the allocated space
Former(s) function(s):
monmalloc

void* secureRealloc ( void *  memblock,
size_t  size 
)

Reallocate memory blocks (redefine the standard realloc function). An error message is printed and the execution stopped if the reallocation fails.

Parameters:
[in] memblock The pointer to previously allocated memory block
[in] size The new block size in bytes
Returns:
The pointer to the reallocated (and possibly moved) memory block
Former(s) function(s):
monrealloc

void secureXFree ( void *  memblock  ) 

Deallocates or frees a memory block (eXtended redefinition of the standard free function). After the memory release, the pointer on the previonsly allocated block is set to null.

Parameters:
[in] memblock The pointer on the allocated memory block to be freed
Former(s) function(s):
monfree


Generated on Thu Mar 22 17:46:31 2007 for SlpTk by  doxygen 1.4.7