mirror of
https://github.com/espressif/openthread.git
synced 2026-08-06 02:37:47 +00:00
Enable mbedTLS dynamic memory allocation in user mode on Windows (#1373)
* change user mode openthread to enable dynamic memory allocation in mbedtls * complete merge by adding OPENTHREAD_MULTIPLE_INSTANCE to last file * remove some extraneous changes that got pulled in accidentally * fix spacing * fix crash in existing tests due to this change * fix x86 build
This commit is contained in:
committed by
Jonathan Hui
parent
1587835134
commit
f3817e76cf
@@ -110,7 +110,7 @@ void TestFuzz(uint32_t aSeconds)
|
||||
#endif
|
||||
|
||||
#ifdef OPENTHREAD_MULTIPLE_INSTANCE
|
||||
uint64_t otInstanceBufferLength = 0;
|
||||
size_t otInstanceBufferLength = 0;
|
||||
uint8_t *otInstanceBuffer = NULL;
|
||||
|
||||
// Call to query the buffer size
|
||||
@@ -119,7 +119,7 @@ void TestFuzz(uint32_t aSeconds)
|
||||
// Call to allocate the buffer
|
||||
otInstanceBuffer = (uint8_t *)malloc(otInstanceBufferLength);
|
||||
VerifyOrQuit(otInstanceBuffer != NULL, "Failed to allocate otInstance");
|
||||
memset(&otInstanceBuffer, 0, otInstanceBufferLength);
|
||||
memset(otInstanceBuffer, 0, otInstanceBufferLength);
|
||||
|
||||
// Initialize Openthread with the buffer
|
||||
aInstance = otInstanceInit(otInstanceBuffer, &otInstanceBufferLength);
|
||||
|
||||
Reference in New Issue
Block a user