|
DeterministicESPAsyncWebServer v6.28.0
Zero-allocation, bounded-execution async HTTP server for ESP32
|
Runtime heap/stack guardrails (DETWS_ENABLE_GUARDRAILS). More...
Go to the source code of this file.
Runtime heap/stack guardrails (DETWS_ENABLE_GUARDRAILS).
Samples the live health of the device - free heap, the heap low-water mark, the largest free block (a fragmentation signal), and the calling task's remaining stack - and trips a guardrail (callback) when any value crosses its configured floor. A proactive fail-safe hook on top of the passive numbers in /metrics: an app can shed load, drop to a safe state, or reboot before exhaustion bites.
The threshold evaluator and the JSON serializer are pure and host-tested; the sample reads esp_get_free_heap_size / heap_caps_get_largest_free_block / uxTaskGetStackHighWaterMark on ESP32 (zeros on host).
Definition in file guardrails.h.