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:
Jorge Vergara
2017-02-23 22:01:59 -08:00
committed by Jonathan Hui
parent 1587835134
commit f3817e76cf
17 changed files with 77 additions and 10 deletions
+2 -2
View File
@@ -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);