24#include "embed_compiler_directives.h"
25#include "embed_dispatch_layout.h"
26#include "embed_types.h"
57#ifndef MMGR_ALIGN_BYTES
59#define MMGR_ALIGN_BYTES 16u
61#if (MMGR_ALIGN_BYTES < 1) || ((MMGR_ALIGN_BYTES & (MMGR_ALIGN_BYTES - 1)) != 0)
62#error "MMGR_ALIGN_BYTES must be a power of two - an alignment specifier takes nothing else"
75#ifndef MMGR_EXTRAM_ATTR
76#define MMGR_EXTRAM_ATTR
91#if EMBED_HAS_ATTRIBUTE(error)
92#define MMGR_ERROR_ATTR(msg_) __attribute__((error(msg_)))
94#define MMGR_ERROR_ATTR(msg_)
112#if EMBED_HAS_ATTRIBUTE(alloc_size)
113#define MMGR_ALLOC_SIZE(arg_) __attribute__((alloc_size(arg_)))
115#define MMGR_ALLOC_SIZE(arg_)
130#define MMGR_PARS_TOKEN(name_) int mmgr_pars_token_##name_ = 0
147#define MMGR_PARS_DECLARED_ONCE(name_) \
150 name_##_declared_twice_but_a_pool_symbol_names_one_region_only = 0 \
168#define MMGR_PARS_CLAIMED_ONCE(name_) \
171 name_##_claimed_twice_but_a_pool_is_dressed_once = 0 \
188#define ParsMemoriaeInternae(name_, bytes_) \
189 MMGR_PARS_DECLARED_ONCE(name_); \
190 MMGR_PARS_TOKEN(name_); \
193 name_##_bytes = (bytes_) \
195 EMBED_ALIGN(MMGR_ALIGN_BYTES) static uint8_t mmgr_pars_storage_##name_[bytes_]; \
196 static const uint8_t *const name_ EMBED_UNUSED = mmgr_pars_storage_##name_; \
197 EMBED_STATIC_ASSERT(sizeof(mmgr_pars_storage_##name_) == name_##_bytes, #name_ " is not the size it was declared")
209#define ParsMemoriaeHospes(name_) \
210 MMGR_PARS_DECLARED_ONCE(name_); \
211 MMGR_PARS_TOKEN(name_)
224#if MMGR_ENABLE_EXTRAM
225#define ParsMemoriaeExternum(name_, bytes_) \
226 MMGR_PARS_DECLARED_ONCE(name_); \
227 MMGR_PARS_TOKEN(name_); \
230 name_##_bytes = (bytes_) \
232 EMBED_ALIGN(MMGR_ALIGN_BYTES) static uint8_t mmgr_pars_storage_##name_[bytes_] MMGR_EXTRAM_ATTR; \
233 static const uint8_t *const name_ EMBED_UNUSED = mmgr_pars_storage_##name_; \
234 EMBED_STATIC_ASSERT(sizeof(mmgr_pars_storage_##name_) == name_##_bytes, #name_ " is not the size it was declared")
252#define MMGR_ASSERT(cond_, msg_) ((void)sizeof((cond_) ? 1 : 0), (void)0)
279#define MMGR_FATAL(msg_) \
Placement between internal and external memory, and a two-buffer index.
DMA channels: the completion event, the port hooks, the praet dispatch table, and the schedule and de...