Svc/StaticMemory/docs/sdd.md
The StaticMemory component is a drop in replacement for Svc::BufferManager that allocates memory out of a static pool of memory. This allows for allocations of known sizes and usage patterns to avoid extra dynamic memory complexity at the expense of extra allocations.
Note: the static memory component operates under the following caveats.
See: Svc::BufferManager for usage examples.
StaticMemory number of allocations and ports are configured using AcConstants.fpp as shown below. This sets the number
of allocate and deallocate port indices as well as the memory segments.
@ Number of static memory allocations
constant StaticMemoryAllocations = 4
The size of each memory segment is set in StaticMemoryConfig.hpp as shown below.
STATIC_MEMORY_ALLOCATION_SIZE = 2048
This means the total memory used is StaticMemoryAllocations * STATIC_MEMORY_ALLOCATION_SIZE bytes.
| Name | Description | Validation |
|---|---|---|
| STAMEM-001 | The static memory shall allocate a fixed block per port index | unit test |
| STAMEM-002 | The static memory shall define allocate and deallocate ports shadowing Svc::BufferManager | unit test |
| Date | Description |
|---|---|
| 2020-12-21 | Initial Draft |