INtime SDK Help
alloca

Allocates a memory block of the specified size.

#include <stdlib.h>

void *alloca (size_t size);

Parameters

size
Bytes to allocate.

Remarks

The alloca() function allocates size bytes of space in the stack frame of the caller. This temporary space is automatically freed on return.

If the calling thread does not have enough uncommitted stack space, a page fault may occur as the prospective buffer is probed. If alloca() is called from the main thread, this predictive fault may not occur due to the difference is how the main thread is created vs products of CreateRtThread.

Return Values

The alloca() function returns a pointer to the beginning of the allocated space.

See Also