alloc0


Description:

public void* alloc0 (size_t n_blocks, size_t n_blocks_bytes, size_t alignment)

This function is similar to alloc, but it will also clear the allocated memory before returning it.

Parameters:

n_blocks

the number of blocks to allocate

alignment

the alignment to be enforced, which must be a positive power of 2 and a multiple of `sizeof(void*)`

n_block_bytes

the size of each block in bytes

Returns:

the allocated, cleared memory


Namespace: GLib.Aligned
Package: glib-2.0