[ First ] [ Previous ] [ Next ] [ Last ] [ Manuals ]
alloca

Allocates memory quickly on the stack.
Compatibility:
This function is compatible with the following targets:
Prototype:
#include <malloc.h>
void *alloca(size_t nbytes);
Parameters:
Parameters for this facility are:
Remarks:
This function returns a pointer to a block of memory that is nbytes long. The block is on the function's stack. This function works quickly since it decrements the current stack pointer. When your function exits, it automatically releases the storage.
If you use alloca() to allocate a lot of storage, be sure to increase the Stack Size for your project in the Project preferences panel.
Return:
If it is successful, alloca() returns a pointer to a block of memory. If it encounters an error, alloca() returns NULL.
See Also:
"calloc"
"free"
"malloc"
"realloc")
[ First ] [ Previous ] [ Next ] [ Last ] [ Manuals ]
Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.
Last updated: August 16, 2000