mirror of
https://github.com/espressif/openthread.git
synced 2026-07-28 06:37:46 +00:00
Make mbedTLS heap size configurable. (#1506)
This commit is contained in:
committed by
Jonathan Hui
parent
e01e3c505e
commit
4fae0c248a
@@ -115,4 +115,12 @@
|
||||
*/
|
||||
#define SETTINGS_CONFIG_PAGE_NUM 4
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MBEDTLS_HEAP_SIZE
|
||||
*
|
||||
* The size of mbedTLS heap buffer when DTLS is enabled.
|
||||
*
|
||||
*/
|
||||
#define OPENTHREAD_CONFIG_MBEDTLS_HEAP_SIZE (4096 * sizeof(void *))
|
||||
|
||||
#endif // OPENTHREAD_CORE_NRF52840_CONFIG_H_
|
||||
|
||||
@@ -40,6 +40,8 @@
|
||||
#include <openthread-config.h>
|
||||
#endif
|
||||
|
||||
#include <openthread-core-config.h>
|
||||
|
||||
#include <mbedtls/memory_buffer_alloc.h>
|
||||
|
||||
namespace Thread {
|
||||
@@ -62,9 +64,9 @@ public:
|
||||
enum
|
||||
{
|
||||
#if OPENTHREAD_ENABLE_DTLS
|
||||
kMemorySize = 2048 * sizeof(void *), ///< Size of memory buffer (bytes).
|
||||
kMemorySize = OPENTHREAD_CONFIG_MBEDTLS_HEAP_SIZE, ///< Size of memory buffer (bytes).
|
||||
#else
|
||||
kMemorySize = 384, ///< Size of memory buffer (bytes).
|
||||
kMemorySize = 384, ///< Size of memory buffer (bytes).
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -677,4 +677,14 @@
|
||||
#define OPENTHREAD_CONFIG_ENABLE_AUTO_START_SUPPORT 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MBEDTLS_HEAP_SIZE
|
||||
*
|
||||
* The size of mbedTLS heap buffer when DTLS is enabled.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MBEDTLS_HEAP_SIZE
|
||||
#define OPENTHREAD_CONFIG_MBEDTLS_HEAP_SIZE (2048 * sizeof(void *))
|
||||
#endif
|
||||
|
||||
#endif // OPENTHREAD_CORE_DEFAULT_CONFIG_H_
|
||||
|
||||
Reference in New Issue
Block a user