.. _`DDS_DomainParticipantFactory_get_instance()`: ../../api_c/html/group__DDSDomainParticipantFactoryModule.html#gac874268715a20b82db24d26d7fbae965 .. _`DDS_WaitSet_new()`: ../../api_c/html/group__DDSConditionsModule.html#ga5490c5e53e46790c2823d43310141c7b .. _`DDS_DomainParticipantFactory_create_participant()`: ../../api_c/html/group__DDSDomainParticipantFactoryModule.html#ga325cf8f97a2752b6f486b7b1c3faf5b8 .. _`DDS_DomainParticipantFactory_finalize_instance()`: ../../api_c/html/group__DDSDomainParticipantFactoryModule.html#ga925b60f4abd015d1ecd3a389feebfa6c .. _`OSAPI_Waitset_delete()`: ../../api_c/html/group__DDSConditionsModule.html#ga06bf93bc3887f0f5b92ddcfa4f5bfa18 .. _`DDS_String_free()`: ../../api_c/html/group__DDSStringClass.html#ga13074f0132f743923a4a36ee533997fe .. _`Configuring Resource Limits`: ../../api_c/html/group__DDSUserManuals__ResourceModule.html Dynamic Memory Allocation ========================= |me| allocates heap memory to create internal data-structures. It is important to know that |me| manages memory allocated from the system heap using its own internal memory management, and only returns memory allocated from the system back to the system when something is deleted. That is, if an application never deletes anything, no memory is returned to the system. As a rule of thumb, in |me| the only APIs that allocate heap memory are: - `DDS_DomainParticipantFactory_get_instance()`_. - Those that contain the word "new", i.e. `DDS_WaitSet_new()`_. - Those that contain the word "create", i.e. `DDS_DomainParticipantFactory_create_participant()`_. And the only APIs that free memory are: - `DDS_DomainParticipantFactory_finalize_instance()`_. - Those that contain the word "delete", i.e. `OSAPI_Waitset_delete()`_. - Those that contain the word "free", i.e. `DDS_String_free()`_. .. only:: cert The |me| user is supposed to use API function which allocate memory only during system initialization. This avoid to run into situations where a resource can not be allocated after the initialization phase. |me| does not support dynamically allocating resources beyond the initial configuration. That is, all resource limits must be finite. This restriction may be removed in a future version.