next up previous contents
Next: Time Up: Utility Routines Previous: Utility Routines

Storage

       

xMalloc

Essentially the same as the Unix malloc routine. Causes an abort if no storage is available; therefore, it has no error return value.

char *xMalloc(int size)

The provides a macro, X_NEW, that can be used to allocate space of a certain type.

#define X_NEW(type) (type *)xMalloc(sizeof(type))

xFree

Frees previously allocated memory.

int xFree(char *buf)



Larry Peterson
Mon Feb 5 16:32:40 MST 1996