### Function

# Gcr secure_memory_try_alloc

since: 3

#### Declaration [src]

    gpointer
    gcr_secure_memory_try_alloc (
      gsize size
    )

#### Description [src]

Allocate a block of non-pageable memory.

If non-pageable memory cannot be allocated, then `NULL` is returned.

Available since: 3

This function is not directly available to language bindings.

#### Parameters

`size`

  Type: `gsize`

  New desired size of the memory block.

#### Return value

Type: `gpointer`

New block, or `NULL` if memory cannot be allocated; memory block should be freed with `gcr_secure_memory_free()`

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