mirror of
https://github.com/espressif/openthread.git
synced 2026-07-09 22:00:19 +00:00
31746000e8
The Instance::HeapCAlloc() method can not be used in constructors when EXTERNAL_HEAP is enabled but works well when internal heap is used. This is because the external heap methods are set by public otHeapSetCAllocFree API after the OT instance is constructed. This commit fixes this issue by having Instance::HeapCAlloc() using otPlatCAlloc when EXTERNAL_HEAP is enabled. It also fixes build issues when MULTIPLE_INSTANCE and EXTERNAL_HEAP are used together.