]>
gcc.gnu.org Git - gcc.git/blob - libiberty/xmemdup.c
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
);
This page took 0.037332 seconds and 5 git commands to generate.