Main Page | Class List | File List | Class Members | File Members | Related Pages

gi_memory.h File Reference

Basic wrappers for the C library's dynamic allocation functions. More...

Go to the source code of this file.

Defines

#define gi_free(ptr)   free(ptr)

Functions

EXTERN_C_BEGIN LIBGIFT_EXPORT
void * 
gi_malloc (size_t size)
LIBGIFT_EXPORT void * gi_calloc (size_t nmemb, size_t size)
LIBGIFT_EXPORT void * gi_realloc (void *ptr, size_t size)


Detailed Description

Basic wrappers for the C library's dynamic allocation functions.

This system is mostly used to produce visual warnings when something goes awry. The caller should still be expected to handle failures gracefully.


Define Documentation

#define gi_free ptr   )     free(ptr)
 

Dummy wrapper for free for symmetry.


Function Documentation

LIBGIFT_EXPORT void* gi_calloc size_t  nmemb,
size_t  size
 

Wrapper for calloc which produces warnings when nmemb=0 or size=0.

EXTERN_C_BEGIN LIBGIFT_EXPORT void* gi_malloc size_t  size  ) 
 

Wrapper for malloc which produces warnings when size=0 and when the allocation fails.

LIBGIFT_EXPORT void* gi_realloc void *  ptr,
size_t  size
 

Wrapper for realloc with similar consequences as gi_malloc.


Generated on Sun Aug 22 07:56:40 2004 by doxygen 1.3.7