From 13aa54421420d0a1b2d986d220877c25400f87a7 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Tue, 6 Jan 2026 16:14:52 +0100 Subject: [PATCH] mqtt queue: prefere PSram --- lib/espMqttClient/src/Packets/Packet.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/espMqttClient/src/Packets/Packet.cpp b/lib/espMqttClient/src/Packets/Packet.cpp index 14d241b20..d33a633f1 100644 --- a/lib/espMqttClient/src/Packets/Packet.cpp +++ b/lib/espMqttClient/src/Packets/Packet.cpp @@ -321,7 +321,14 @@ bool Packet::_allocate(size_t remainingLength, bool check) { #if EMC_USE_MEMPOOL _data = reinterpret_cast(_memPool.malloc(_size)); #else - _data = reinterpret_cast(malloc(_size)); +#ifdef EMSESP_STANDALONE + _data = reinterpret_cast(malloc(_size)); +#else + _data = reinterpret_cast(ps_malloc(_size)); + if (!_data) { + _data = reinterpret_cast(malloc(_size)); + } +#endif #endif if (!_data) { _size = 0;