|
Corium 1.1.0
High-Performance Zero-Heap C++20 MPSC Application Runtime
|
Yes. All event storage, timers, handlers (via Small Buffer Optimized FastDelegate), background service registrations, and coroutines allocate memory in static arrays and stack frames defined at compile time. This is verified automatically in CI via custom overloaded global new/delete hooks in test_zero_heap_guarantee.cpp.
Yes. The corium/async/ module is entirely modular and optional. You can use standard CRTP static polymorphism (corium::Application) with synchronous event handlers or background worker services (corium::BackgroundService) without using coroutines.
The queue capacity is a template parameter on BoundedMpscQueuePolicy or RuntimeBuilder (default 1024). A good rule of thumb is: $$\text{Capacity} \ge 2 \times (\text{Max Producer Event Burst Rate} \times \text{Max Dispatch Latency})$$ For bare-metal microcontrollers (ARM Cortex-M), you can downscale to 64 or 128 elements to minimize static memory footprint.
Yes. Use corium::embedded::IsrEventSink or corium::embedded::FreeRtosIsrSink. These handles push events into the lock-free Dmitry Vyukov ring buffer without acquiring mutexes or allocating memory, ensuring ISR safety across ARM CMSIS, ESP32, and STM32 platforms.
Corium provides configurable Overflow Policies:
DropNewestOverflowPolicy (default): Drops the incoming event quietly.DropOldestOverflowPolicy: Evicts the oldest unhandled event to prioritize fresh data.AuditOverflowPolicy: Increments an atomic drop counter for diagnostics and monitoring.PanicOverflowPolicy: Asserts or invokes the panic handler on overflow.Yes. Corium includes:
corium::FreeRtosClockPolicy: Drives the timer scheduler from xTaskGetTickCount().corium::embedded::FreeRtosIsrSink: Manages xHigherPriorityTaskWoken and portYIELD_FROM_ISR().corium::embedded::InterruptLock: Wraps taskENTER_CRITICAL() / portENTER_CRITICAL().Corium is a header-only library with two distribution options:
Option A: Add as submodule / subdirectory
Option B: Single-Header distribution