#include <stdlib.h>
#include <stdio.h>
#include <memory.h>
#include "cmdline.h"
#include "umem.h"

void OutOfMemory(void)
{
	fatal("Out Of Memory");
}
void *ReallocateMemory(void *buf, uint size)
{
	void *ptr = realloc(buf,size);
	if (!ptr)
		OutOfMemory();
  return(ptr);
}
/*
 * Allocate memory.  Dump out if none
 */
void *AllocateMemory(uint size)
{
	void *ptr = malloc(size);
	if (!ptr)
		OutOfMemory();
	memset(ptr,0,size);
  return(ptr);
}
/*
 * Deallocate memory.  Synonomous to FREE
 */
void DeallocateMemory(void *pos)
{
	free(pos);
}