|
ZephyrDB
Embedded database for Zephyr RTOS: KV, time-series, and document models
|
Static slab declaration macros for fragmentation-free allocation. More...
Macros | |
| #define | ZDB_ALIGN_UP(value, align) |
Round value up to the next multiple of align. | |
| #define | ZDB_MEM_SLAB_DEFINE(name, block_size, block_count, align) |
| Declare a static memory slab with build-time size validation. | |
| #define | ZDB_DEFINE_CORE_SLAB(name) |
Declare the core-context slab, sized by CONFIG_ZDB_CORE_SLAB_BLOCK_SIZE / _COUNT. | |
| #define | ZDB_DEFINE_CURSOR_SLAB(name) |
Declare the cursor slab, sized by CONFIG_ZDB_CURSOR_SLAB_BLOCK_SIZE / _COUNT. | |
| #define | ZDB_DEFINE_KV_IO_SLAB(name) |
Declare the KV I/O slab, sized by CONFIG_ZDB_KV_IO_SLAB_BLOCK_SIZE / _COUNT. | |
| #define | ZDB_DEFINE_TS_INGEST_SLAB(name) |
Declare the time-series ingest slab, sized by CONFIG_ZDB_TS_INGEST_SLAB_BLOCK_SIZE / _COUNT. | |
Static slab declaration macros for fragmentation-free allocation.
ZephyrDB never calls the kernel heap; all runtime allocation comes from memory slabs the application declares at compile time, sized by Kconfig.
| #define ZDB_ALIGN_UP | ( | value, | |
| align ) |
Round value up to the next multiple of align.
| #define ZDB_DEFINE_CORE_SLAB | ( | name | ) |
Declare the core-context slab, sized by CONFIG_ZDB_CORE_SLAB_BLOCK_SIZE / _COUNT.
| name | Slab variable name. |
| #define ZDB_DEFINE_CURSOR_SLAB | ( | name | ) |
Declare the cursor slab, sized by CONFIG_ZDB_CURSOR_SLAB_BLOCK_SIZE / _COUNT.
| name | Slab variable name. |
| #define ZDB_DEFINE_KV_IO_SLAB | ( | name | ) |
Declare the KV I/O slab, sized by CONFIG_ZDB_KV_IO_SLAB_BLOCK_SIZE / _COUNT.
The block size bounds the largest storable KV record (see zdb_kv_set()).
| name | Slab variable name. |
| #define ZDB_DEFINE_TS_INGEST_SLAB | ( | name | ) |
Declare the time-series ingest slab, sized by CONFIG_ZDB_TS_INGEST_SLAB_BLOCK_SIZE / _COUNT.
| name | Slab variable name. |
| #define ZDB_MEM_SLAB_DEFINE | ( | name, | |
| block_size, | |||
| block_count, | |||
| align ) |
Declare a static memory slab with build-time size validation.
Wraps K_MEM_SLAB_DEFINE_STATIC and asserts at compile time that both dimensions are non-zero. The block size is rounded up to align.
| name | Slab variable name. |
| block_size | Size of one block in bytes (> 0). |
| block_count | Number of blocks (> 0). |
| align | Block alignment in bytes. |