Rational® Rhapsody® implements static memory allocation by redefining the new and delete operators for each event and class that use local heaps. The memory allocator holds enough memory to accommodate n instances of the specific element, where n is the value of the BaseNumberOfInstances property. The memory allocation is performed during system construction and uses dynamic memory. The memory allocator uses a LIFO (stack) algorithm, as follows:
The generated class (whether a class, event, or triggered operation) is instrumented to introduce additional code needed for use by the memory allocator (specifically the next pointer).
Attempts to instantiate a class whose memory pool is exhausted result in a call to the OMMemoryPoolIsEmpty() operation (in which you can set a breakpoint) and in a tracer message. Failure to instantiate results in a tracer message.