### Function

# GLib slice_alloc0

since: 2.10

#### Declaration [src]

    gpointer
    g_slice_alloc0 (
      gsize block_size
    )

#### Description [src]

Allocates a block of memory via `g_slice_alloc()` and initializes the returned memory to 0.

Since GLib 2.76 this always uses the system `malloc()` implementation internally.

Available since: 2.10

#### Parameters

`block_size`

  Type: `gsize`

  The number of bytes to allocate.

#### Return value

Type: `gpointer`

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

The data is owned by the called function.
The return value can be `NULL`.