mirror of
https://github.com/espressif/openthread.git
synced 2026-07-27 06:17:47 +00:00
[posix] set external heap callbacks (#6054)
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
|
||||
#include <openthread-core-config.h>
|
||||
#include <openthread/border_router.h>
|
||||
#include <openthread/heap.h>
|
||||
#include <openthread/tasklet.h>
|
||||
#include <openthread/platform/alarm-milli.h>
|
||||
#include <openthread/platform/otns.h>
|
||||
@@ -94,6 +95,10 @@ otInstance *otSysInit(otPlatformConfig *aPlatformConfig)
|
||||
instance = otInstanceInitSingle();
|
||||
assert(instance != nullptr);
|
||||
|
||||
#if OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE
|
||||
otHeapSetCAllocFree(calloc, free);
|
||||
#endif
|
||||
|
||||
#if OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE
|
||||
platformBackboneInit(instance, aPlatformConfig->mBackboneInterfaceName);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user