stackalloc
stackalloc |
Purpose
Allocate memory on the Mosel execution stack.
Synopsis
void *stackalloc(XPRMcontext ctx, size_t size, int zero);
Arguments
ctx
|
Mosel's execution context
|
size
|
Amount of memory to allocate in bytes
|
zero
|
If non null the allocated memory is initialised with zeros
|
Return value
A pointer to the allocated memory
Further information
This function allocates a block of memory on the Mosel execution stack. This memory block must be released before the termination of the calling subroutine by a call to
stackfree otherwise there is no guarantee on when the deallocation will occur (the stack is anyway released at program termination).
Related topics