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. */
17 xmemdup (input
, copy_size
, alloc_size
)
22 PTR output
= xcalloc (1, alloc_size
);
23 memcpy (output
, input
, copy_size
);