mirror of
https://github.com/espressif/openthread.git
synced 2026-08-21 01:49:52 +00:00
[posix] set up heap before creating OT instance (#6128)
This is a quick fix that allows heap usage in constructors.
This commit is contained in:
@@ -92,13 +92,13 @@ otInstance *otSysInit(otPlatformConfig *aPlatformConfig)
|
||||
#endif
|
||||
platformRandomInit();
|
||||
|
||||
instance = otInstanceInitSingle();
|
||||
assert(instance != nullptr);
|
||||
|
||||
#if OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE
|
||||
otHeapSetCAllocFree(calloc, free);
|
||||
#endif
|
||||
|
||||
instance = otInstanceInitSingle();
|
||||
assert(instance != nullptr);
|
||||
|
||||
#if OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE
|
||||
platformBackboneInit(instance, aPlatformConfig->mBackboneInterfaceName);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user