2006-07-06

xmalloc(), xfree()

void *xmalloc(size_t size)
{
  void *ptr =malloc( size);
  if( ptr ==NULL)
    diediedie( "xmalloc(): out of memory");
  return ptr;
}

void xfree(void *ptr)
{
  if( ptr ==NULL)
    diediedie( "xfree(): NULL argument");
  free( ptr);
}