Azinix

safe_mem.c File Reference

These are interface routines to be placed between a program and the system memory allocator. More...

#include "util.h"

Go to the source code of this file.

Functions

char * MMalloc (int size)
 Safe malloc.
char * MMrealloc (char *obj, int size)
 Safe realloc.
void MMfree (char *obj)
 Safe free.


Detailed Description

These are interface routines to be placed between a program and the system memory allocator.

It forces well-defined semantics for several 'borderline' cases:

Definition in file safe_mem.c.


Function Documentation

char* MMalloc ( int  size  ) 

Safe malloc.

Definition at line 36 of file safe_mem.c.

void MMfree ( char *  obj  ) 

Safe free.

Definition at line 87 of file safe_mem.c.

char* MMrealloc ( char *  obj,
int  size 
)

Safe realloc.

Definition at line 59 of file safe_mem.c.