### Function

# Gegl try_malloc

since: 0.4

#### Declaration [src]

    gpointer
    gegl_try_malloc (
      gsize n_bytes
    )

#### Description [src]

Allocates `n_bytes` of memory. If allocation fails, or if `n_bytes` is 0, returns `NULL`.

Returns a pointer to the allocated memory, or NULL.

Available since: 0.4

This function is not directly available to language bindings.

#### Parameters

`n_bytes`

  Type: `gsize`

  The number of bytes to allocte.

#### Return value

Type: `gpointer`

No description available.

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