Function

GLibslice_copy

Declaration [src]

gpointer
g_slice_copy (
  gsize block_size,
  gconstpointer mem_block
)

Description [src]

Allocates a block of memory from the slice allocator and copies block_size bytes into it from mem_block.

mem_block must be non-NULL if block_size is non-zero.

Available since:2.14

Parameters

block_size gsize
 

The number of bytes to allocate.

mem_block gconstpointer
 

The memory to copy.

Return value

Returns: gpointer
 

A pointer to the allocated memory block, which will be NULL if and only if mem_size is 0