Commit Graph

6 Commits

Author SHA1 Message Date
Guillaume Souchere 0c570d860d feat(esp_event): Add option to allocate event loop in external RAM 2026-01-08 10:38:43 +01:00
Jimmy Wennlund e2a6653680 feat(esp_event): Allow an event carry more data without malloc
This is both a feature and an optimization.

Feature:
Adjustable size of the internal storage in esp_event queue, currently
used by ISR posting, as they wont be able to make a malloc.

Optimization:
When non-isr is posting an event, use the inernal storage in the struct
instead of always allocating a new heap for the data. Most events in
esp-idf only contains a few bytes event information, and we have that
allocation payed for anyway.

This solved in a big part our memory fragmentation issue, as events
happens freqvently and used to create small memory allocations for just
4 bytes, and then in the event handler we usually allocated a bigger
chunk of heap for our feature. When returning from the event handler,
the 4 byte allocation was freed, leaving a hole in the heap.

Merges: https://github.com/espressif/esp-idf/pull/17797
2025-11-05 17:46:00 +02:00
Roland Dobai bf626f2aba Rename Kconfig options (components/esp_event) 2019-05-21 09:09:01 +02:00
Renz Christian Bagaporo 2b914f2d22 esp_event: allow posting events from ISRs 2019-04-10 18:06:05 +08:00
Roland Dobai 37126d3451 Correct Kconfigs according to the coding style 2019-01-29 13:37:01 +01:00
Renz Christian Bagaporo 5a83347bec event: Implement event loop library 2018-10-26 13:14:19 +08:00