The SOMRealloc function changes the size of the previously allocated region of memory pointed to by ptr so that it contains size bytes. The new size may be greater or less than the original size. The SOMRealloc function has the same interface as the C realloc function. It performs the same basic function as realloc with some supplemental error checking. If an error occurs, the SOMError function is called. This routine is replaceable by changing the value of the global variable SOMRealloc.