You should use the UFO memory allocation mechanism to dynamically allocate and free memory. This will make use of the Softimage Compositor's memory manager. The functions ufoMalloc, ufoRealloc, and ufoFree have the same functionality as the malloc, realloc and free system calls.
Order of UFO Process User Function Calls
UFO user functions are called as follows:
UFO Process Instance Saving and Loading
ufoProcessWriteAsciiData ufoProcessReadAsciiData ufoProcessWriteBinaryData ufoProcessReadBinaryData
ufoProcessPreSequenceRender : Rendering Frame f ufoProcessCanAvoidRendering ufoProcessCalcDefinedRectangle ufoProcessCalcDefinePixelType ufoProcessCalcNeedRectangles ufoProcessSpecifyConvertPixelTypes ufoProcessPreRender Render Pass 0 : Rendering Pass p ufoProcessPreRenderPass ufoProcessRenderRectangle [ufoProcessRenderRectangle ..]
(possibly rendered in tiles or slices)
ufoProcessRenderLine .. [ufoProcessRenderLine ..]
ufoProcessRenderPixel.. [ufoProcessRenderPixel..] ufoProcessPostRenderPass Rendering Pass p+1 : ufoProcessPostRender Render Frame f+1 : ufoProcessPostSequenceRender