Function

Gcrsecure_memory_try_realloc

Declaration [src]

gpointer
gcr_secure_memory_try_realloc (
  gpointer memory,
  gsize size
)

Description [src]

Reallocate a block of non-pageable memory.

Glib memory is also reallocated correctly when passed to this function. 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 memory cannot be allocated, NULL is returned and the original block of memory remains intact.

Parameters

memory gpointer
 

Pointer to reallocate or NULL to allocate a new block.

size gsize
 

New desired size of the memory block.

Return value

Returns: gpointer
 

The new block, or NULL if memory cannot be allocated; the memory block should be freed with gcr_secure_memory_free()