Memory.memdup

Allocates @byte_size bytes of memory, and copies @byte_size bytes into it from @mem. If @mem is %NULL it returns %NULL.

struct Memory
static
void*
memdup
(
void* mem
,)

Parameters

mem void*

the memory to copy.

byteSize uint

the number of bytes to copy.

Return Value

Type: void*

a pointer to the newly-allocated copy of the memory, or %NULL if @mem is %NULL.

Meta