Mem routines

Overview

The Mem_alloc() routine allocates a block of memory in the indicated size, and then returns a pointer to the block. If no memory is available, the routine RbError_exit() is called. See the RbError routines for more details.

The Mem_realloc() routine re-allocates a block of memory to be the indicated size, and then returns a pointer to the block. If no memory is available, the routine RbError_exit() is called.

The Mem_calloc() routine allocates a block of memory in the indicated size, zeros the memory, and then returns a pointer to the block. If no memory is available, the routine RbError_exit() is called.

The Mem_strdup() routine allocates a block of memory large enough to hold the indicated string, copies the string into the new memory, and then returns a pointer to the block. If no memory is available, the routine RbError_exit() is called.

The Mem_free() routine deallocates a block of previously-allocated memory.