This module allocates RAM from the following places, and understanding these helps you tune it down:
- Built-in batch pipe buffer:
CONFIG_APP_STORAGE_BATCH_BUFFER_SIZEbytes are reserved at boot. - RAM backend ring buffers: For each enabled data type, a ring buffer is declared with capacity
sizeof(type) * CONFIG_APP_STORAGE_MAX_RECORDS_PER_TYPE. - Message buffers:
struct storage_msgcarries abuffer[STORAGE_MAX_DATA_SIZE], whereSTORAGE_MAX_DATA_SIZEis the max size of any enabled data type. Enabling large types increases this buffer and several temporary buffers. - Subscriber queue: Size is controlled by system zbus configuration.
- Thread stack:
CONFIG_APP_STORAGE_THREAD_STACK_SIZE.