/**
 * Memory allocation/reallocation wrapper routines
 *
 * Author: Ramkumar Natarajan (nrk@cs.purdue.edu)
 **/

#include "memutils.h"

void *my_malloc(size_t nbytes) {
    void *retp = NULL;

    retp = malloc(nbytes);
    if ( !retp )
        exit(EXIT_FAILURE);
    return retp;
}

void *my_realloc(void *origptr, size_t newsz) {
    void *retp;

    retp = realloc(origptr, newsz);
    if ( !retp )
        exit(EXIT_FAILURE);

    return retp;
}
