/* * Duplicate object into a memory pool. * $Id$ * Copyright (c) 1997 by Tycho Softworks. * For conditions of distribution and reuse see product license. */#include<std/string.h>#include<other/memory.h>void*memdup(void*obj,size_tsize){void*new=(void*)malloc(size);if(!new)returnNULL;memcpy(new,obj,size);returnnew;}