Skip to content

ESP32 wifi should be able to use SPIRAM heap for buffer allocation #86722

@Mierunski

Description

@Mierunski

Is your enhancement proposal related to a problem? Please describe.
I'm currently migrating solution based on esp32 which used Zephyr 3.6.0
Issue is partly related to this: #78305

Previous behavior was that when SPIRAM was enabled, all memory allocations were moved to SPIRAM heap by default.
Now with shared multi heap its possible to allocate data on user side, but it does not work for libraries, especially espressif wifi driver, where packets are allocated internally, so switching CONFIG_ESP32_WIFI_NET_ALLOC_SPIRAM moves only initialization data, but buffer allocations are done in system heap.

This way, we are running out of memory, as we cannot pass option to use shared multi heap for network buffers internally in wifi driver

Describe the solution you'd like
KConfig option to enable allocation of network buffers in WIFI driver using SPIRAM heap.
Or option to allow previous behavior, where all malloc calls where forwarded to SPIRAM heap

This is critical for us, as with current implementation we are stuck on zephyr 3.6 because of this change

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions