mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-01-26 08:39:09 +03:00
mqtt queue: prefere PSram
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user