mqtt queue: prefere PSram

This commit is contained in:
MichaelDvP
2026-01-06 16:14:52 +01:00
parent 978c738f27
commit 13aa544214

View File

@@ -321,7 +321,14 @@ bool Packet::_allocate(size_t remainingLength, bool check) {
#if EMC_USE_MEMPOOL #if EMC_USE_MEMPOOL
_data = reinterpret_cast<uint8_t*>(_memPool.malloc(_size)); _data = reinterpret_cast<uint8_t*>(_memPool.malloc(_size));
#else #else
_data = reinterpret_cast<uint8_t*>(malloc(_size)); #ifdef EMSESP_STANDALONE
_data = reinterpret_cast<uint8_t*>(malloc(_size));
#else
_data = reinterpret_cast<uint8_t*>(ps_malloc(_size));
if (!_data) {
_data = reinterpret_cast<uint8_t*>(malloc(_size));
}
#endif
#endif #endif
if (!_data) { if (!_data) {
_size = 0; _size = 0;