### Function

# GLib aligned_alloc0

since: 2.72

#### Declaration

    gpointer
    g_aligned_alloc0 (
      gsize n_blocks,
      gsize n_block_bytes,
      gsize alignment
    )

#### Description

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

Available since: 2.72

#### Parameters

`n_blocks`

  Type: `gsize`

  The number of blocks to allocate.

`n_block_bytes`

  Type: `gsize`

  The size of each block in bytes.

`alignment`

  Type: `gsize`

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

#### Return value

Type: `gpointer`

The allocated, cleared memory.

The caller of the function takes ownership of the data, and is responsible for freeing it.
The return value can be `NULL`.