Namespaces
Variants
Views
Actions

std::realloc

From cppreference.com
< cpp‎ | memory‎ | c
Revision as of 12:51, 2 August 2011 by P12bot (Talk | contribs)

Template:cpp/memory/c/sidebar

Defined in header <cstdlib>
void *malloc( size_t size );

Allocates an area of memory.

Template:params

size - number of bytes to allocate

Return value

pointer to the beginning of newly allocated memory or Template:cpp if error has occurred. The pointer must be deallocated with free().

Template:notes

This function does not call constructors or initialize the memory in any way. Thus preferred method of memory allocation is new expression.