CONFIG_MBEDTLS_HEAP_SIZE

Heap size for mbed TLS

Heap size for mbed TLS

Type: int

Help

The mbedtls routines will use this heap if enabled. For streaming communication with arbitrary (HTTPS) servers on the Internet, 32KB + overheads (up to another 20KB) may be needed. Ensure to adjust the heap size according to the need of the application.

Help

The mbedtls routines will use this heap if enabled. See ext/lib/crypto/mbedtls/include/mbedtls/config.h and MBEDTLS_MEMORY_BUFFER_ALLOC_C option for details. That option is not enabled by default. Default value for the heap size is not set as it depends on the application. For streaming communication with arbitrary (HTTPS) servers on the Internet, 32KB + overheads (up to another 20KB) may be needed. For some dedicated and specific usage of mbedtls API, the 1000 bytes might be ok.

Direct dependencies

(MBEDTLS_ENABLE_HEAP && NORDIC_SECURITY_BACKEND) || (MBEDTLS_ENABLE_HEAP && MBEDTLS)

(Includes any dependencies from ifs and menus.)

Defaults

  • 512

  • 512

Kconfig definitions

At /jenkins_workspace/workspace/nrfconnect-nrf_doc_v1.2-branch_2/nrfxlib/nrf_security/Kconfig:61

Included via Kconfig:8Kconfig.zephyr:9/jenkins_workspace/workspace/nrfconnect-nrf_doc_v1.2-branch_2/test_doc/_build/Kconfig.modules:5/jenkins_workspace/workspace/nrfconnect-nrf_doc_v1.2-branch_2/nrfxlib/Kconfig.nrfxlib:14

Menu path: (Top) → Modules → Nordic nrfxlib → Nordic Security → Use Nordic provided security backend → mbed TLS memory configuration → Enable global heap for mbed TLS

config MBEDTLS_HEAP_SIZE
    int "Heap size for mbed TLS"
    default 512
    depends on MBEDTLS_ENABLE_HEAP && NORDIC_SECURITY_BACKEND
    help
      The mbedtls routines will use this heap if enabled.
      For streaming communication with arbitrary (HTTPS) servers on the
      Internet, 32KB + overheads (up to another 20KB) may be needed.
      Ensure to adjust the heap size according to the need of the
      application.

At modules/Kconfig.mbedtls:111

Included via Kconfig:8Kconfig.zephyr:10modules/Kconfig:6

Menu path: (Top) → Modules → mbedTLS Support → Enable global heap for mbed TLS

config MBEDTLS_HEAP_SIZE
    int "Heap size for mbed TLS"
    default 512
    depends on MBEDTLS_ENABLE_HEAP && MBEDTLS
    help
      The mbedtls routines will use this heap if enabled.
      See ext/lib/crypto/mbedtls/include/mbedtls/config.h and
      MBEDTLS_MEMORY_BUFFER_ALLOC_C option for details. That option is not
      enabled by default.
      Default value for the heap size is not set as it depends on the
      application. For streaming communication with arbitrary (HTTPS)
      servers on the Internet, 32KB + overheads (up to another 20KB) may
      be needed. For some dedicated and specific usage of mbedtls API, the
      1000 bytes might be ok.

(The ‘depends on’ condition includes propagated dependencies from ifs and menus.)