.. _architecture_memory: Memory module ============= .. raw:: html .. raw:: html :file: ../figures/svg_href_loader.html .. raw:: html :file: ../figures/stack_diagram.svg Safe DDS provides a memory module that is used throughout the whole library's code base to handle and encapsulate memory management. This module is responsible for handling memory objects, both static and preallocated, as explained in :ref:`architecture_platform_memory_management`. .. _architecture_memory_byte_array: Byte array view interfaces -------------------------- Memory module provides a set of interfaces for abstracting and protecting raw memory access: * `memory::IByteArrayView <../doxygen/classeprosima_1_1safedds_1_1memory_1_1_i_byte_array_view.html>`__ * `memory::IConstByteArrayView <../doxygen/classeprosima_1_1safedds_1_1memory_1_1_i_const_byte_array_view.html>`__ * `memory::IMutableByteArrayView <../doxygen/classeprosima_1_1safedds_1_1memory_1_1_i_mutable_byte_array_view.html>`__ * `memory::IConstMutableByteArrayView <../doxygen/classeprosima_1_1safedds_1_1memory_1_1_i_const_mutable_byte_array_view.html>`__ These interfaces are implemented by: * `memory::byte_view::ByteArrayView <../doxygen/classeprosima_1_1safedds_1_1memory_1_1byte__array_1_1_byte_array_view.html>`__ Containers ---------- Safe DDS provides a set of interfaces that define multiple containers that are used throughout the whole library to handle collections of objects: * `memory::IContainerBase <../doxygen/classeprosima_1_1safedds_1_1memory_1_1_i_container_base.html>`__ * `memory::IList <../doxygen/classeprosima_1_1safedds_1_1memory_1_1_i_list.html>`__ * `memory::IReferenceList <../doxygen/classeprosima_1_1safedds_1_1memory_1_1_i_reference_list.html>`__ * `memory::IMapBase <../doxygen/classeprosima_1_1safedds_1_1memory_1_1_i_map_base.html>`__ * `memory::IMap <../doxygen/classeprosima_1_1safedds_1_1memory_1_1_i_map.html>`__ * `memory::IReferenceMap <../doxygen/classeprosima_1_1safedds_1_1memory_1_1_i_reference_map.html>`__ * `memory::ISet <../doxygen/classeprosima_1_1safedds_1_1memory_1_1_i_set.html>`__ * `memory::IStringView <../doxygen/classeprosima_1_1safedds_1_1memory_1_1_i_string_view.html>`__ These interfaces are implemented with a static memory approach by: * `memory::container::StaticList <../doxygen/classeprosima_1_1safedds_1_1memory_1_1container_1_1_static_list.html>`__ * `memory::container::StaticLinkedList <../doxygen/classeprosima_1_1safedds_1_1memory_1_1container_1_1_static_linked_list.html>`__ * `memory::container::StaticOrderedLinkedList <../doxygen/classeprosima_1_1safedds_1_1memory_1_1container_1_1_static_ordered_linked_list.html>`__ * `memory::container::StaticReferenceList <../doxygen/classeprosima_1_1safedds_1_1memory_1_1container_1_1_static_reference_list.html>`__ * `memory::container::StaticMap <../doxygen/classeprosima_1_1safedds_1_1memory_1_1container_1_1_static_map.html>`__ * `memory::container::StaticReferenceMap <../doxygen/classeprosima_1_1safedds_1_1memory_1_1container_1_1_static_reference_map.html>`__ * `memory::container::StaticSet <../doxygen/classeprosima_1_1safedds_1_1memory_1_1container_1_1_static_set.html>`__ * `memory::container::StaticString <../doxygen/classeprosima_1_1safedds_1_1memory_1_1container_1_1_static_string.html>`__ And with a dynamic memory approach by: * `memory::container::PreallocList <../doxygen/classeprosima_1_1safedds_1_1memory_1_1container_1_1_prealloc_list.html>`__ * `memory::container::PreallocLinkedList <../doxygen/classeprosima_1_1safedds_1_1memory_1_1container_1_1_prealloc_linked_list.html>`__ * `memory::container::PreallocOrderedLinkedList <../doxygen/classeprosima_1_1safedds_1_1memory_1_1container_1_1_prealloc_ordered_linked_list.html>`__ * `memory::container::PreallocReferenceList <../doxygen/classeprosima_1_1safedds_1_1memory_1_1container_1_1_prealloc_reference_list.html>`__ * `memory::container::PreallocMap <../doxygen/classeprosima_1_1safedds_1_1memory_1_1container_1_1_prealloc_map.html>`__ * `memory::container::PreallocReferenceMap <../doxygen/classeprosima_1_1safedds_1_1memory_1_1container_1_1_prealloc_reference_map.html>`__ * `memory::container::PreallocSet <../doxygen/classeprosima_1_1safedds_1_1memory_1_1container_1_1_prealloc_set.html>`__ Additionally, the Memory Unit provides the following extra containers: * `memory::container::Array <../doxygen/structeprosima_1_1safedds_1_1memory_1_1container_1_1_array.html>`__ * `memory::container::EmptyMap <../doxygen/classeprosima_1_1safedds_1_1memory_1_1container_1_1_empty_map.html>`__ * `memory::container::PreallocMemoryConfig <../doxygen/classeprosima_1_1safedds_1_1memory_1_1container_1_1_prealloc_memory_config.html>`__ Finally, the Memory Unit provides a set of interfaces for managing element ranges: * `memory::IBaseBitmapSet <../doxygen/classeprosima_1_1safedds_1_1memory_1_1_i_base_bitmap_set.html>`__ * `memory::IRemovableBitmapSet <../doxygen/classeprosima_1_1safedds_1_1memory_1_1_i_removable_bitmap_set.html>`__ These interfaces are implemented by: * `memory::container::BitmapSet <../doxygen/classeprosima_1_1safedds_1_1memory_1_1container_1_1_bitmap_set.html>`__