Requirements#

Memory Library Requirements
status: draft
security: YES
safety: ASIL_B
tags: requirements, memory_library

Functional Requirements#

Shared Memory Management
status: valid
security: YES
safety: ASIL_B

The Memory library shall provide capabilities for creating, opening and managing shared memory.

Polymorphic OffsetPtr Allocator
status: valid
security: YES
safety: ASIL_B

The Memory library shall provide polymorphic memory resource allocators using offset pointers instead of raw pointers to enable allocation in shared memory regions accessible across multiple processes. The standard library’s std::pmr::polymorphic_allocator is not applicable as it uses raw pointers that are invalid when shared memory is mapped at different virtual addresses in different processes.

Shared Memory Containers
status: valid
security: YES
safety: ASIL_B

The Memory library shall provide type aliases for STL containers (vector, map, string) that use offset pointers for shared memory storage.

Inter-Process Synchronization
status: valid
security: YES
safety: ASIL_B

The Memory library shall provide file-based locking mechanisms for inter-process synchronization and mutual exclusion.

Memory Region Bounds Checking
status: valid
security: YES
safety: ASIL_B

The Memory library shall track and validate memory region boundaries to prevent out-of-bounds access in shared memory.

Endianness Conversion
status: valid
security: NO
safety: ASIL_B

The Memory library shall provide byte order conversion between host and network byte order (big/little endian).

Sealed Shared Memory
status: valid
security: YES
safety: ASIL_B

The Memory library shall provide immutable shared memory segments that become read-only after initialization.

Type-Safe Shared Memory
status: valid
security: YES
safety: ASIL_B

The Memory library shall provide type-safe wrappers for typed shared memory objects with compile-time type checking.

Memory Resource Registry
status: valid
security: NO
safety: ASIL_B

The Memory library shall provide a global registry for memory resource lookup and management.

String Utilities
status: valid
security: NO
safety: ASIL_B

The Memory library shall provide zero-allocation string utilities including splitting, comparison, and compile-time literals.

Atomic Operations in Shared Memory
status: valid
security: YES
safety: ASIL_B

The Memory library shall provide atomic operations on shared memory data for lock-free inter-process communication.

Non-Functional Requirements#

Deterministic Memory Allocation
status: valid
security: NO
safety: ASIL_B

The shared memory allocation shall provide deterministic behavior with predictable execution time suitable for real-time automotive systems.

Process Address Space Independence
status: valid
security: YES
safety: ASIL_B

The Memory library shall ensure shared memory data structures remain valid regardless of process virtual address space mappings.