The Steady Mode is configured using two Model Extensions. Examples are given in the Technical Reference of Application Base.
Steady Mode makes use of the aforementioned polymorphic memory resource’s default resource. To avoid non-deterministic timing of memory allocations and deallocations, the default memory resource is pre-allocated. To enable this behavior, the size of the default resource is set along with its’ behavior upon exhaustion at runtime:
The size and behavior of the default resource is defined with the BswDefaultResource and BswDefaultResourceConfig classes extending the AUTOSAR class process, with the attributes size (integer) and expanding (boolean). The dimension of size is bytes. Expanding defines whether the default resource will attempt to allocate more memory from the system upon exhaustion at runtime.
Further component-specific features of Steady Mode are activated by setting the class BswSteadyMode boolean attribute steadyMode to true. BswSteadyMode extends the AUTOSAR class process. MICROSAR Adaptive components make use of this setting to set up Steady Mode apart from the usage of the default memory resource.

Please refer to the Technical References for further component-specific configuration.
Calibrating the Size of the Default Resource
To avoid non-deterministic timing of memory allocations and deallocations at runtime, the size of the pre-allocated default memory resource has to be sufficient to serve all memory requests at runtime. Users shall identify test scenario(s) yielding reliable and accurate results, i.e. in a close-to-production environment.
Generally, the following workflow is advised:
- Configure an initial size for the default memory resource
- Run suitable test scenario(s) with the default resource set to
expanding == true
- Observe the size of the default resource, logged upon deinitialization (see below):
- If the reported size of the default resource is greater than the configured size, configure an increased size of the default resource and return to step 2.
- If the reported size of the default resource is less than or equal to the size of the configured size, go to step 4.
- Monitor the memory demand of the default resource over time. In this step, the attribute expanding of the default memory resource can be set to false, triggering an error upon exhaustion at runtime.

When the default memory resource’s attribute expanding is set to false, an error will be triggered upon exhaustion at runtime. This ultimately leads to an abort of the process by the amsr::AbortOnErrorResource
, which is included in the default resource chain. The latter is required, because the resource is currently also used by standard C++ containers (see Foundation: Polymorphic Memory Resources).

At runtime, the size of the default memory resource grows monotonically. Thus, the final size of the default memory resource is logged with ara::core::Deinitialize()
.

Please refer to the Technical Reference of Application Base for more information.

Changes in the underlying system model, configuration or runtime behavior of applications impact the memory demand at runtime for which the size of memory resource used in Steady Mode is measured. It is advisable to have a method in place to monitor and recalibrate the sizes of the memory resources like the default memory resource, for example before a software update.