/*
	mem_dup

	Duplicate the length "n" storage area pointed to by "old"
	in a new storage area obtained from malloc().
	Returns the address of the new storage area, or NULL if malloc() failed.
*/
#include <ncbi.h>
#include <gishlib.h>

VoidPtr LIBCALL
mem_dup(old, n)
	register VoidPtr	old;
	register size_t	n;
{
	register VoidPtr	new;

	new = mem_malloc(n);
	if (new != NULL)
		Nlm_MemCpy(new, old, n);
	return new;
}

