1 /* xmemdup.c -- Duplicate a memory buffer, using xcalloc.
2 This trivial function is in the public domain.
3 Jeff Garzik, September 1999. */
11 #include <sys/types.h> /* For size_t. */
14 xmemdup (input
, copy_size
, alloc_size
)
19 PTR output
= xcalloc (1, alloc_size
);
20 memcpy (output
, input
, copy_size
);