Visit Mozilla.org

PR REALLOC

From MDC


< NSPR API Reference < Memory Management Operations

Resizes allocated memory from the heap.

Contents

[edit] Syntax

#include <prmem.h>

void * PR_REALLOC(_ptr, _size);

[edit] Parameters

_ptr
Pointer to the memory to be resized.
_size
The requested new size.

[edit] Returns

An untyped pointer to the resized memory, or if the allocation attempt fails, NULL. Call PR_GetError() to retrieve the error returned by the libc function realloc().

[edit] Description

This macro re-allocates memory at the specified location and sets its size to the specified number of bytes. It behaves exactly like PR_Realloc().