MQTT Outbox Malloc from PSRAM
Posted: Fri Dec 16, 2022 12:55 am
I have an application I am developing for a commercial project that uses an ESP32 with SPI PSRAM.
I've just realised that messages I queue in the MQTT outbox are duplicated in a buffer allocated from a standard malloc call. With the way I have it setup this will come from the internal RAM. Would it be possible/practical to modify the library to have a config option to prefer allocation of all outbox buffers from the external RAM?
I realise there is a custom outbox implementation config option, I haven't found examples for that yet, but might have a go at that too.
That's not as simple of course...
I've just realised that messages I queue in the MQTT outbox are duplicated in a buffer allocated from a standard malloc call. With the way I have it setup this will come from the internal RAM. Would it be possible/practical to modify the library to have a config option to prefer allocation of all outbox buffers from the external RAM?
I realise there is a custom outbox implementation config option, I haven't found examples for that yet, but might have a go at that too.
That's not as simple of course...