MemorySlice.sliceAlloc0

Allocates a block of memory via g_slice_alloc() and initializes the returned memory to 0. Note that the underlying slice allocation mechanism can be changed with the [G_SLICE=always-malloc]G_SLICE environment variable.

struct MemorySlice
static
void*
sliceAlloc0
(
size_t blockSize
)

Parameters

blockSize size_t

the number of bytes to allocate

Return: a pointer to the allocated block, which will be %NULL if and only if @mem_size is 0

Meta

Since

2.10