### Function

# Gcr secure_memory_realloc

#### Declaration [src]

    gpointer
    gcr_secure_memory_realloc (
      gpointer memory,
      gsize size
    )

#### Description [src]

Reallocate a block of non-pageable memory.

Glib memory is also reallocated correctly. If called with a null pointer, then a new block of memory is allocated. If called with a zero size, then the block of memory is freed.

If non-pageable memory cannot be allocated then normal memory will be returned.

This function is not directly available to language bindings.

#### Parameters

`memory`

  Type: `gpointer`

  Pointer to reallocate or `NULL` to allocate a new block.

  The argument can be `NULL`.
  The data is owned by the caller of the function.

`size`

  Type: `gsize`

  New desired size of the memory block, or 0 to free the memory.

#### Return value

Type: `gpointer`

New block, or `NULL` if the block was freed; 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`.