ibm Rational Rhapsody 7.5 — Properties for Static Memory Allocation

Basic code generation concepts Properties for Static Memory Allocation The following table lists some of the properties that enable you to configure static allocations for the generated code. Setting any of these properties at a level higher than an individual instance sets the default for all instances. For example, setting a class property at the component level sets the default for all class instances. In all cases, behavior is undefined if the actual number of instances exceeds the maximum declared number. 960 User Guide Property Subject and Metaclass Description BaseNumberOfInstances CG::Class _ CG::Event Specifies the size of the local heap memory pool allocated for either:

• Instances of the class ( CG::Class) _ • Instances of the event ( CG::Event) _ This property provides support for static architectures found in hard real-time and safety-critical systems without memory management capabilities during run time. All instances of events are dynamically allocated during initialization. Once allocated, the event queue for a thread remains static in size. Triggered operations use the properties defined for events. When the memory pool is exhausted, an additional amount, specified by the AdditionalNumberOf Instances property, is allocated. Memory pools for classes can be used only with the Flat statechart implementation scheme.

AdditionalNumberOfInstances CG::Class _ CG::Event Specifies the number of instances or events for which memory is allocated when the current pool is empty. ProtectStaticMemoryPool CG::Class/Event Determines whether to protect access to the allocated memory pool using an operating system mutex to provide thread safety.