You might
allocate events from a static memory pool,
rather than dynamically allocating memory for events during run time,
by setting the following properties under CG::Event:
- AdditionalNumberOfInstances -
Specifies the number of array elements that is added if the number
of events exceeds the size of the original array
- BaseNumberOfInstances -
Sets the
initial size of the static array to be allocated for events
- EmptyMemoryPoolCallback - Specifies
the name of the callback function that allocates more memory if the
static pool is exhausted
- EmptyMemoryPoolMessage -
Specifies
whether a message is displayed when the static memory pool is empty
- ProtectStaticMemoryPool - Specifies
whether to protect the static memory pool using an operating system
mutex
See the definitions provided for
the properties
on the applicable Properties tab of the Features
window.
Note: In C, it is possible to allocate only
events,
but not user‑defined objects, from static memory pools.