Allocate memory from the Stack.
void * _alloca (size_t size);
void * alloca (size_t size);
Required Header |
<stdlib.h> |
Return Value
Each of these functions returns a pointer to the allocated memory. A null pointer value indicates an error.
Parameters
size
The number of bytes required
Remarks
The _alloca function allocates size bytes from the Stack. The JCC Stack is made up of possibly many Stack segments, one of which is currently being used by the function calling _alloca. Only this Stack segment can be used by _alloca to allocate memory.
The pointer returned must not be freed using a library function, it is automatically freed when the calling function terminates.
See Also malloc