Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

xmalloc.c File Reference

contains customized realloc(), malloc() and free() functions. More...

#include "common.h"
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#include "xmalloc.h"

Include dependency graph for xmalloc.c:

Include dependency graph

Go to the source code of this file.

Functions

void * pd_realloc (void *ptr, size_t size)
 reallocs mem like realloc(). More...

void * pd_malloc (size_t size)
 Allocates memory like malloc(), but exits the programm, if it fails! More...

void pd_free (void *ptr)
 frees memory like free(), but not, if ptr == NULL. More...


Detailed Description

contains customized realloc(), malloc() and free() functions.

Definition in file xmalloc.c.


Function Documentation

void pd_free void *    ptr
 

frees memory like free(), but not, if ptr == NULL.

Parameters:
ptr  the pointer to be freed
if ptr == NULL, nothing is changed

Definition at line 59 of file xmalloc.c.

void* pd_malloc size_t    size
 

Allocates memory like malloc(), but exits the programm, if it fails!

Parameters:
size  the amount of memory to be allocated
Returns:
a pointer to allocated memory of size size

Definition at line 43 of file xmalloc.c.

void* pd_realloc void *    ptr,
size_t    size
 

reallocs mem like realloc().

Parameters:
ptr  the pointer whose allocated memory should be changed in size
size  the new size of allocated memory of ptr
Returns:
a pointer to the new allocated memory. if the realloc() failed, NULL is returned

Definition at line 36 of file xmalloc.c.


Generated on Fri Jan 25 22:41:03 2002 for PDepp Webserver by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001