cta_mem.h File Reference

Memory management routines. These routines are equivalent to standard C routines but allows us to do additional checking and debugging. More...

#include <stdlib.h>
#include "cta_system.h"

Go to the source code of this file.

Functions

CTAEXPORT void CTA_Free (void *ptr)
 Free memory that has been allocated with CTA_Malloc or CTA_Realloc.
CTAEXPORT void * CTA_Malloc (size_t size)
 Allocates size bytes of memory and returns a pointer to the allocated memory.
CTAEXPORT void * CTA_Realloc (void *ptr, size_t size)
 Changes the size of the allocated memory block pointed by ptr Values in ptr are copied to returned memoy block.

Detailed Description

Memory management routines. These routines are equivalent to standard C routines but allows us to do additional checking and debugging.

Definition in file cta_mem.h.


Function Documentation

CTAEXPORT void CTA_Free ( void *  ptr  ) 

Free memory that has been allocated with CTA_Malloc or CTA_Realloc.

Parameters:
ptr I pointer to memory block to deallocate
CTAEXPORT void* CTA_Malloc ( size_t  size  ) 

Allocates size bytes of memory and returns a pointer to the allocated memory.

Parameters:
size I number of bytes to allocate
Returns:
pointer to allocated memory. NULL is returned when allocation fails
CTAEXPORT void* CTA_Realloc ( void *  ptr,
size_t  size 
)

Changes the size of the allocated memory block pointed by ptr Values in ptr are copied to returned memoy block.

Parameters:
size I pointer to memoryblock of which the size is changed
size I number of bytes of returned memory block
Returns:
pointer to allocated memory. NULL is returned when allocation fails

Generated on 4 Mar 2014 for OpenDA by  doxygen 1.6.1