GLib.malloc0
Description: Reference for GLib.malloc0

### Function

# GLibmalloc0

#### Declaration [src]

    gpointer
    g_malloc0 (
      gsize n_bytes
    )

#### Description [src]

Allocates `n_bytes` bytes of memory, initialized to 0’s. If `n_bytes` is 0 it returns `NULL`.

If the allocation fails (because the system is out of memory), the program is terminated.

#### Parameters

`n_bytes`

  Type: `gsize`

  The number of bytes to allocate.

#### Return value

Type: `gpointer`

A pointer to the allocated memory.

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