Disparity in Heap Needed for NVS Library Initialization

squirtle321
Posts: 11
Joined: Tue Jan 11, 2022 9:26 pm

Disparity in Heap Needed for NVS Library Initialization

Postby squirtle321 » Mon Mar 25, 2024 4:58 pm

Using ESP-IDF v4.4.1

Referencing the note in the NVS Library documentation there's an overhead of 128 bytes to 640 bytes (https://docs.espressif.com/projects/esp ... -hash-list)

In practice I'm noticing a constant overhead of around 84 bytes per page + some constant overhead.

I'm invoking the heap tracing library to trace leaks, and then also tracking what the heap low water mark was before and after calling nvs_init.

Here's my test application:

Code: Select all

#include "esp_heap_trace.h"
#include "nvs.h"
#include "nvs_flash.h"
#define NUM_RECORDS 100
heap_trace_record_t trace_record[NUM_RECORDS];

void app_main(void)
{
    // Check initial heap low water mark
    multi_heap_info_t heap_info;
    heap_caps_get_info(&heap_info, MALLOC_CAP_DEFAULT);
    ESP_LOGI(TAG, "free heap1: %d", heap_info.total_free_bytes);

    // Start tracing library
    ESP_ERROR_CHECK( heap_trace_init_standalone(trace_record, NUM_RECORDS) );
    ESP_ERROR_CHECK( heap_trace_start(HEAP_TRACE_LEAKS) );
    
    // Check heap low water mark again
    heap_caps_get_info(&heap_info, MALLOC_CAP_DEFAULT);
    ESP_LOGI(TAG, "free heap2: %d", heap_info.total_free_bytes);
    
    // Invoke nvs_init
    nvs_flash_init();
    
    // Check heap low water mark again
    heap_caps_get_info(&heap_info, MALLOC_CAP_DEFAULT);
    ESP_LOGI(TAG, "free heap3: %d", heap_info.total_free_bytes);
    
    // Stop heap tracing, print results
    ESP_ERROR_CHECK( heap_trace_stop() );
    heap_trace_dump();
    
    // Check heap low water mark again
    heap_caps_get_info(&heap_info, MALLOC_CAP_DEFAULT);
    ESP_LOGI(TAG, "free heap4: %d", heap_info.total_free_bytes);

    for (int i=0; i<15; i++)
    {
        ESP_LOGI("main", "resting %d", i);
        vTaskDelay(1000);
    }
    
    esp_restart();
   }
I'm using two partition tables to compare, one partition table the NVS partition is size 0x40000, the other partition table has an NVS partition of size 0x160000.

Here is what I'm seeing:

Difference in Heap Low Water Mark Before and After NVS Init (NVS Size 0x160000) : 31072
Pages (NVS Size 0x160000) : 352
Heap per page (NVS Size 0x160000) : 88.27272727

Difference in Heap Low Water Mark Before and After NVS Init (NVS Size 0x40000) : 6880
Pages (NVS Size 0x40000) : 64
Heap per page (NVS Size 0x40000) : 107.5

Here's the heap tracing library output for Partition table size 0x160000

Code: Select all

20 allocations trace (100 entry buffer)
92 bytes (@ 0x3ffb47e0) allocated CPU 0 ccount 0x05107454 caller 0x40086a33:0x40086d27:0x400d6732:0x400d6771:0x400d4df0:0x400e6c2d:
0x40086a33: xQueueGenericCreate at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/queue.c:447

0x40086d27: xQueueCreateMutex at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/queue.c:564

0x400d6732: nvs::Lock::init() at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_platform.hpp:63
 (inlined by) nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:129

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

0x400d4df0: app_main at C:/Project/application\build_v5/../main/main.c:763 (discriminator 2)

0x400e6c2d: main_task at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/port_common.c:130

40 bytes (@ 0x3ffb4850) allocated CPU 0 ccount 0x0510966c caller 0x400d89f8:0x400d6bf1:0x400d6757:0x400d6771:0x400d4df0:0x400e6c2d:
0x400d89f8: operator new(unsigned int, std::nothrow_t const&) at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/new_opnt.cc:43

0x400d6bf1: nvs::NVSPartitionManager::get_instance() at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:21

0x400d6757: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

0x400d4df0: app_main at C:/Project/application\build_v5/../main/main.c:763 (discriminator 2)

0x400e6c2d: main_task at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/port_common.c:130

92 bytes (@ 0x3ffb488c) allocated CPU 0 ccount 0x0510d3a4 caller 0x40086a33:0x40086d27:0x40083447:0x40083473:0x400835d0:0x400d6070:0x400d62d3:0x400d630b:0x400d8050:0x400d6d4c
0x40086a33: xQueueGenericCreate at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/queue.c:447

0x40086d27: xQueueCreateMutex at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/queue.c:564

0x40083447: lock_init_generic at C:/Espressif/frameworks/esp-idf-v4.4.1/components/newlib/locks.c:74

0x40083473: lock_acquire_generic at C:/Espressif/frameworks/esp-idf-v4.4.1/components/newlib/locks.c:128

0x400835d0: _lock_acquire at C:/Espressif/frameworks/esp-idf-v4.4.1/components/newlib/locks.c:164

0x400d6070: ensure_partitions_loaded at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:72

0x400d62d3: esp_partition_find at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:87

0x400d630b: esp_partition_find_first at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:140

0x400d8050: nvs::partition_lookup::lookup_nvs_partition(char const*, nvs::NVSPartition**) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_lookup.cpp:14

0x400d6d4c: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:45

48 bytes (@ 0x3ffb4924) allocated CPU 0 ccount 0x05134c0c caller 0x400d60f8:0x400d62d3:0x400d630b:0x400d8050:0x400d6d4c:0x400d675c:0x400d6771:0x400d4df0:0x400e6c2d:
0x400d60f8: load_partitions at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:214
 (inlined by) ensure_partitions_loaded at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:74

0x400d62d3: esp_partition_find at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:87

0x400d630b: esp_partition_find_first at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:140

0x400d8050: nvs::partition_lookup::lookup_nvs_partition(char const*, nvs::NVSPartition**) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_lookup.cpp:14

0x400d6d4c: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:45

0x400d675c: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

0x400d4df0: app_main at C:/Project/application\build_v5/../main/main.c:763 (discriminator 2)

0x400e6c2d: main_task at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/port_common.c:130

48 bytes (@ 0x3ffb4968) allocated CPU 0 ccount 0x05136df0 caller 0x400d60f8:0x400d62d3:0x400d630b:0x400d8050:0x400d6d4c:0x400d675c:0x400d6771:0x400d4df0:0x400e6c2d:
0x400d60f8: load_partitions at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:214
 (inlined by) ensure_partitions_loaded at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:74

0x400d62d3: esp_partition_find at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:87

0x400d630b: esp_partition_find_first at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:140

0x400d8050: nvs::partition_lookup::lookup_nvs_partition(char const*, nvs::NVSPartition**) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_lookup.cpp:14

0x400d6d4c: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:45

0x400d675c: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

0x400d4df0: app_main at C:/Project/application\build_v5/../main/main.c:763 (discriminator 2)

0x400e6c2d: main_task at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/port_common.c:130

48 bytes (@ 0x3ffb49ac) allocated CPU 0 ccount 0x05137ddc caller 0x400d60f8:0x400d62d3:0x400d630b:0x400d8050:0x400d6d4c:0x400d675c:0x400d6771:0x400d4df0:0x400e6c2d:
0x400d60f8: load_partitions at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:214
 (inlined by) ensure_partitions_loaded at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:74

0x400d62d3: esp_partition_find at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:87

0x400d630b: esp_partition_find_first at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:140

0x400d8050: nvs::partition_lookup::lookup_nvs_partition(char const*, nvs::NVSPartition**) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_lookup.cpp:14

0x400d6d4c: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:45

0x400d675c: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

0x400d4df0: app_main at C:/Project/application\build_v5/../main/main.c:763 (discriminator 2)

0x400e6c2d: main_task at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/port_common.c:130

48 bytes (@ 0x3ffb49f0) allocated CPU 0 ccount 0x05139114 caller 0x400d60f8:0x400d62d3:0x400d630b:0x400d8050:0x400d6d4c:0x400d675c:0x400d6771:0x400d4df0:0x400e6c2d:
0x400d60f8: load_partitions at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:214
 (inlined by) ensure_partitions_loaded at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:74

0x400d62d3: esp_partition_find at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:87

0x400d630b: esp_partition_find_first at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:140

0x400d8050: nvs::partition_lookup::lookup_nvs_partition(char const*, nvs::NVSPartition**) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_lookup.cpp:14

0x400d6d4c: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:45

0x400d675c: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

0x400d4df0: app_main at C:/Project/application\build_v5/../main/main.c:763 (discriminator 2)

0x400e6c2d: main_task at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/port_common.c:130

48 bytes (@ 0x3ffb4a34) allocated CPU 0 ccount 0x0513a100 caller 0x400d60f8:0x400d62d3:0x400d630b:0x400d8050:0x400d6d4c:0x400d675c:0x400d6771:0x400d4df0:0x400e6c2d:
0x400d60f8: load_partitions at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:214
 (inlined by) ensure_partitions_loaded at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:74

0x400d62d3: esp_partition_find at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:87

0x400d630b: esp_partition_find_first at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:140

0x400d8050: nvs::partition_lookup::lookup_nvs_partition(char const*, nvs::NVSPartition**) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_lookup.cpp:14

0x400d6d4c: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:45

0x400d675c: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

0x400d4df0: app_main at C:/Project/application\build_v5/../main/main.c:763 (discriminator 2)

0x400e6c2d: main_task at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/port_common.c:130

48 bytes (@ 0x3ffb4a78) allocated CPU 0 ccount 0x0513b428 caller 0x400d60f8:0x400d62d3:0x400d630b:0x400d8050:0x400d6d4c:0x400d675c:0x400d6771:0x400d4df0:0x400e6c2d:
0x400d60f8: load_partitions at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:214
 (inlined by) ensure_partitions_loaded at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:74

0x400d62d3: esp_partition_find at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:87

0x400d630b: esp_partition_find_first at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:140

0x400d8050: nvs::partition_lookup::lookup_nvs_partition(char const*, nvs::NVSPartition**) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_lookup.cpp:14

0x400d6d4c: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:45

0x400d675c: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

0x400d4df0: app_main at C:/Project/application\build_v5/../main/main.c:763 (discriminator 2)

0x400e6c2d: main_task at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/port_common.c:130

48 bytes (@ 0x3ffb4abc) allocated CPU 0 ccount 0x0513c428 caller 0x400d60f8:0x400d62d3:0x400d630b:0x400d8050:0x400d6d4c:0x400d675c:0x400d6771:0x400d4df0:0x400e6c2d:
0x400d60f8: load_partitions at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:214
 (inlined by) ensure_partitions_loaded at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:74

0x400d62d3: esp_partition_find at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:87

0x400d630b: esp_partition_find_first at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:140

0x400d8050: nvs::partition_lookup::lookup_nvs_partition(char const*, nvs::NVSPartition**) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_lookup.cpp:14

0x400d6d4c: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:45

0x400d675c: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

0x400d4df0: app_main at C:/Project/application\build_v5/../main/main.c:763 (discriminator 2)

0x400e6c2d: main_task at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/port_common.c:130

16 bytes (@ 0x3ffb48fc) allocated CPU 0 ccount 0x0515fa40 caller 0x400d89f8:0x400d8064:0x400d6d4c:0x400d675c:0x400d6771:0x400d4df0:0x400e6c2d:
0x400d89f8: operator new(unsigned int, std::nothrow_t const&) at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/new_opnt.cc:43

0x400d8064: nvs::partition_lookup::lookup_nvs_partition(char const*, nvs::NVSPartition**) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_lookup.cpp:25

0x400d6d4c: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:45

0x400d675c: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

0x400d4df0: app_main at C:/Project/application\build_v5/../main/main.c:763 (discriminator 2)

0x400e6c2d: main_task at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/port_common.c:130

104 bytes (@ 0x3ffb4b00) allocated CPU 0 ccount 0x051634d8 caller 0x400d89f8:0x400d6c5c:0x400d6d66:0x400d675c:0x400d6771:0x400d4df0:0x400e6c2d:
0x400d89f8: operator new(unsigned int, std::nothrow_t const&) at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/new_opnt.cc:43

0x400d6c5c: nvs::NVSPartitionManager::init_custom(nvs::Partition*, unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:73

0x400d6d66: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:53

0x400d675c: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

0x400d4df0: app_main at C:/Project/application\build_v5/../main/main.c:763 (discriminator 2)

0x400e6c2d: main_task at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/port_common.c:130

29572 bytes (@ 0x3ffb4b7c) allocated CPU 0 ccount 0x051664b8 caller 0x400d89f8:0x400d8a38:0x400d7d1a:0x400d69a2:0x400d6c89:0x400d6d66:0x400d675c:0x400d6771:0x400d4df0:0x400e6c2d
0x400d89f8: operator new(unsigned int, std::nothrow_t const&) at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/new_opnt.cc:43

0x400d8a38: operator new[](unsigned int, std::nothrow_t const&) at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/new_opvnt.cc:34

0x400d7d1a: nvs::PageManager::load(nvs::Partition*, unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_pagemanager.cpp:28 (discriminator 4)

0x400d69a2: nvs::Storage::init(unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_storage.cpp:91

0x400d6c89: nvs::NVSPartitionManager::init_custom(nvs::Partition*, unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:91

0x400d6d66: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:53

0x400d675c: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

0x400d4df0: app_main at C:/Project/application\build_v5/../main/main.c:763 (discriminator 2)

0x400e6c2d: main_task at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/port_common.c:130

128 bytes (@ 0x3ffbbf14) allocated CPU 0 ccount 0x0518a260 caller 0x400d89f8:0x400d6e31:0x400d79c0:0x400d7b89:0x400d7da2:0x400d69a2:0x400d6c89:0x400d6d66:0x400d675c:0x400d6771
0x400d89f8: operator new(unsigned int, std::nothrow_t const&) at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/new_opnt.cc:43

0x400d6e31: nvs::HashList::insert(nvs::Item const&, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_item_hash_list.cpp:59

0x400d79c0: nvs::Page::mLoadEntryTable() at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_page.cpp:699
 (inlined by) nvs::Page::mLoadEntryTable() at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_page.cpp:515

0x400d7b89: nvs::Page::load(nvs::Partition*, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_page.cpp:83

0x400d7da2: nvs::PageManager::load(nvs::Partition*, unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_pagemanager.cpp:33

0x400d69a2: nvs::Storage::init(unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_storage.cpp:91

0x400d6c89: nvs::NVSPartitionManager::init_custom(nvs::Partition*, unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:91

0x400d6d66: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:53

0x400d675c: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

128 bytes (@ 0x3ffbbfa8) allocated CPU 0 ccount 0x0523fcb8 caller 0x400d89f8:0x400d6e31:0x400d79c0:0x400d7b89:0x400d7da2:0x400d69a2:0x400d6c89:0x400d6d66:0x400d675c:0x400d6771
0x400d89f8: operator new(unsigned int, std::nothrow_t const&) at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/new_opnt.cc:43

0x400d6e31: nvs::HashList::insert(nvs::Item const&, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_item_hash_list.cpp:59

0x400d79c0: nvs::Page::mLoadEntryTable() at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_page.cpp:699
 (inlined by) nvs::Page::mLoadEntryTable() at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_page.cpp:515

0x400d7b89: nvs::Page::load(nvs::Partition*, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_page.cpp:83

0x400d7da2: nvs::PageManager::load(nvs::Partition*, unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_pagemanager.cpp:33

0x400d69a2: nvs::Storage::init(unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_storage.cpp:91

0x400d6c89: nvs::NVSPartitionManager::init_custom(nvs::Partition*, unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:91

0x400d6d66: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:53

0x400d675c: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

128 bytes (@ 0x3ffbc03c) allocated CPU 0 ccount 0x0528b474 caller 0x400d89f8:0x400d6e31:0x400d7848:0x400d7b89:0x400d7da2:0x400d69a2:0x400d6c89:0x400d6d66:0x400d675c:0x400d6771
0x400d89f8: operator new(unsigned int, std::nothrow_t const&) at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/new_opnt.cc:43

0x400d6e31: nvs::HashList::insert(nvs::Item const&, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_item_hash_list.cpp:59

0x400d7848: nvs::Page::mLoadEntryTable() at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_page.cpp:625
 (inlined by) nvs::Page::mLoadEntryTable() at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_page.cpp:515

0x400d7b89: nvs::Page::load(nvs::Partition*, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_page.cpp:83

0x400d7da2: nvs::PageManager::load(nvs::Partition*, unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_pagemanager.cpp:33

0x400d69a2: nvs::Storage::init(unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_storage.cpp:91

0x400d6c89: nvs::NVSPartitionManager::init_custom(nvs::Partition*, unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:91

0x400d6d66: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:53

0x400d675c: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

28 bytes (@ 0x3ffbc0d0) allocated CPU 0 ccount 0x072a5b04 caller 0x400d89f8:0x400d6a65:0x400d6c89:0x400d6d66:0x400d675c:0x400d6771:0x400d4df0:0x400e6c2d:
0x400d89f8: operator new(unsigned int, std::nothrow_t const&) at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/new_opnt.cc:43

0x400d6a65: nvs::Storage::init(unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_storage.cpp:105

0x400d6c89: nvs::NVSPartitionManager::init_custom(nvs::Partition*, unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:91

0x400d6d66: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:53

0x400d675c: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

0x400d4df0: app_main at C:/Project/application\build_v5/../main/main.c:763 (discriminator 2)

0x400e6c2d: main_task at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/port_common.c:130

28 bytes (@ 0x3ffbc100) allocated CPU 0 ccount 0x072ad458 caller 0x400d89f8:0x400d6a65:0x400d6c89:0x400d6d66:0x400d675c:0x400d6771:0x400d4df0:0x400e6c2d:
0x400d89f8: operator new(unsigned int, std::nothrow_t const&) at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/new_opnt.cc:43

0x400d6a65: nvs::Storage::init(unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_storage.cpp:105

0x400d6c89: nvs::NVSPartitionManager::init_custom(nvs::Partition*, unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:91

0x400d6d66: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:53

0x400d675c: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

0x400d4df0: app_main at C:/Project/application\build_v5/../main/main.c:763 (discriminator 2)

0x400e6c2d: main_task at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/port_common.c:130

28 bytes (@ 0x3ffbc130) allocated CPU 0 ccount 0x072d87bc caller 0x400d89f8:0x400d6a65:0x400d6c89:0x400d6d66:0x400d675c:0x400d6771:0x400d4df0:0x400e6c2d:
0x400d89f8: operator new(unsigned int, std::nothrow_t const&) at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/new_opnt.cc:43

0x400d6a65: nvs::Storage::init(unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_storage.cpp:105

0x400d6c89: nvs::NVSPartitionManager::init_custom(nvs::Partition*, unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:91

0x400d6d66: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:53

0x400d675c: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

0x400d4df0: app_main at C:/Project/application\build_v5/../main/main.c:763 (discriminator 2)

0x400e6c2d: main_task at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/port_common.c:130

28 bytes (@ 0x3ffbc160) allocated CPU 0 ccount 0x072df258 caller 0x400d89f8:0x400d6a65:0x400d6c89:0x400d6d66:0x400d675c:0x400d6771:0x400d4df0:0x400e6c2d:
0x400d89f8: operator new(unsigned int, std::nothrow_t const&) at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/new_opnt.cc:43

0x400d6a65: nvs::Storage::init(unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_storage.cpp:105

0x400d6c89: nvs::NVSPartitionManager::init_custom(nvs::Partition*, unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:91

0x400d6d66: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:53

0x400d675c: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

0x400d4df0: app_main at C:/Project/application\build_v5/../main/main.c:763 (discriminator 2)

0x400e6c2d: main_task at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/port_common.c:130

30748 bytes 'leaked' in trace (20 allocations)
total allocations 100 total frees 80
Here's the heap tracing library output for Partition table size 0x40000

Code: Select all

20 allocations trace (100 entry buffer)
92 bytes (@ 0x3ffb47e0) allocated CPU 0 ccount 0x0510222c caller 0x40086a33:0x40086d27:0x400d6732:0x400d6771:0x400d4df0:0x400e6c2d:
0x40086a33: xQueueGenericCreate at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/queue.c:447

0x40086d27: xQueueCreateMutex at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/queue.c:564

0x400d6732: nvs::Lock::init() at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_platform.hpp:63
 (inlined by) nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:129

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

0x400d4df0: app_main at C:/Project/application\build_v5/../main/main.c:763 (discriminator 2)

0x400e6c2d: main_task at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/port_common.c:130

40 bytes (@ 0x3ffb4850) allocated CPU 0 ccount 0x05104444 caller 0x400d89f8:0x400d6bf1:0x400d6757:0x400d6771:0x400d4df0:0x400e6c2d:
0x400d89f8: operator new(unsigned int, std::nothrow_t const&) at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/new_opnt.cc:43

0x400d6bf1: nvs::NVSPartitionManager::get_instance() at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:21

0x400d6757: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

0x400d4df0: app_main at C:/Project/application\build_v5/../main/main.c:763 (discriminator 2)

0x400e6c2d: main_task at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/port_common.c:130

92 bytes (@ 0x3ffb488c) allocated CPU 0 ccount 0x05108178 caller 0x40086a33:0x40086d27:0x40083447:0x40083473:0x400835d0:0x400d6070:0x400d62d3:0x400d630b:0x400d8050:0x400d6d4c
0x40086a33: xQueueGenericCreate at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/queue.c:447

0x40086d27: xQueueCreateMutex at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/queue.c:564

0x40083447: lock_init_generic at C:/Espressif/frameworks/esp-idf-v4.4.1/components/newlib/locks.c:74

0x40083473: lock_acquire_generic at C:/Espressif/frameworks/esp-idf-v4.4.1/components/newlib/locks.c:128

0x400835d0: _lock_acquire at C:/Espressif/frameworks/esp-idf-v4.4.1/components/newlib/locks.c:164

0x400d6070: ensure_partitions_loaded at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:72

0x400d62d3: esp_partition_find at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:87

0x400d630b: esp_partition_find_first at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:140

0x400d8050: nvs::partition_lookup::lookup_nvs_partition(char const*, nvs::NVSPartition**) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_lookup.cpp:14

0x400d6d4c: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:45

48 bytes (@ 0x3ffb4924) allocated CPU 0 ccount 0x0512f9e4 caller 0x400d60f8:0x400d62d3:0x400d630b:0x400d8050:0x400d6d4c:0x400d675c:0x400d6771:0x400d4df0:0x400e6c2d:
0x400d60f8: load_partitions at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:214
 (inlined by) ensure_partitions_loaded at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:74

0x400d62d3: esp_partition_find at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:87

0x400d630b: esp_partition_find_first at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:140

0x400d8050: nvs::partition_lookup::lookup_nvs_partition(char const*, nvs::NVSPartition**) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_lookup.cpp:14

0x400d6d4c: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:45

0x400d675c: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

0x400d4df0: app_main at C:/Project/application\build_v5/../main/main.c:763 (discriminator 2)

0x400e6c2d: main_task at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/port_common.c:130

48 bytes (@ 0x3ffb4968) allocated CPU 0 ccount 0x05131bc8 caller 0x400d60f8:0x400d62d3:0x400d630b:0x400d8050:0x400d6d4c:0x400d675c:0x400d6771:0x400d4df0:0x400e6c2d:
0x400d60f8: load_partitions at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:214
 (inlined by) ensure_partitions_loaded at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:74

0x400d62d3: esp_partition_find at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:87

0x400d630b: esp_partition_find_first at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:140

0x400d8050: nvs::partition_lookup::lookup_nvs_partition(char const*, nvs::NVSPartition**) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_lookup.cpp:14

0x400d6d4c: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:45

0x400d675c: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

0x400d4df0: app_main at C:/Project/application\build_v5/../main/main.c:763 (discriminator 2)

0x400e6c2d: main_task at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/port_common.c:130

48 bytes (@ 0x3ffb49ac) allocated CPU 0 ccount 0x05132bb4 caller 0x400d60f8:0x400d62d3:0x400d630b:0x400d8050:0x400d6d4c:0x400d675c:0x400d6771:0x400d4df0:0x400e6c2d:
0x400d60f8: load_partitions at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:214
 (inlined by) ensure_partitions_loaded at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:74

0x400d62d3: esp_partition_find at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:87

0x400d630b: esp_partition_find_first at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:140

0x400d8050: nvs::partition_lookup::lookup_nvs_partition(char const*, nvs::NVSPartition**) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_lookup.cpp:14

0x400d6d4c: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:45

0x400d675c: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

0x400d4df0: app_main at C:/Project/application\build_v5/../main/main.c:763 (discriminator 2)

0x400e6c2d: main_task at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/port_common.c:130

48 bytes (@ 0x3ffb49f0) allocated CPU 0 ccount 0x05133eec caller 0x400d60f8:0x400d62d3:0x400d630b:0x400d8050:0x400d6d4c:0x400d675c:0x400d6771:0x400d4df0:0x400e6c2d:
0x400d60f8: load_partitions at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:214
 (inlined by) ensure_partitions_loaded at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:74

0x400d62d3: esp_partition_find at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:87

0x400d630b: esp_partition_find_first at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:140

0x400d8050: nvs::partition_lookup::lookup_nvs_partition(char const*, nvs::NVSPartition**) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_lookup.cpp:14

0x400d6d4c: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:45

0x400d675c: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

0x400d4df0: app_main at C:/Project/application\build_v5/../main/main.c:763 (discriminator 2)

0x400e6c2d: main_task at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/port_common.c:130

48 bytes (@ 0x3ffb4a34) allocated CPU 0 ccount 0x05134ed8 caller 0x400d60f8:0x400d62d3:0x400d630b:0x400d8050:0x400d6d4c:0x400d675c:0x400d6771:0x400d4df0:0x400e6c2d:
0x400d60f8: load_partitions at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:214
 (inlined by) ensure_partitions_loaded at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:74

0x400d62d3: esp_partition_find at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:87

0x400d630b: esp_partition_find_first at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:140

0x400d8050: nvs::partition_lookup::lookup_nvs_partition(char const*, nvs::NVSPartition**) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_lookup.cpp:14

0x400d6d4c: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:45

0x400d675c: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

0x400d4df0: app_main at C:/Project/application\build_v5/../main/main.c:763 (discriminator 2)

0x400e6c2d: main_task at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/port_common.c:130

48 bytes (@ 0x3ffb4a78) allocated CPU 0 ccount 0x05136200 caller 0x400d60f8:0x400d62d3:0x400d630b:0x400d8050:0x400d6d4c:0x400d675c:0x400d6771:0x400d4df0:0x400e6c2d:
0x400d60f8: load_partitions at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:214
 (inlined by) ensure_partitions_loaded at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:74

0x400d62d3: esp_partition_find at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:87

0x400d630b: esp_partition_find_first at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:140

0x400d8050: nvs::partition_lookup::lookup_nvs_partition(char const*, nvs::NVSPartition**) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_lookup.cpp:14

0x400d6d4c: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:45

0x400d675c: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

0x400d4df0: app_main at C:/Project/application\build_v5/../main/main.c:763 (discriminator 2)

0x400e6c2d: main_task at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/port_common.c:130

48 bytes (@ 0x3ffb4abc) allocated CPU 0 ccount 0x051371fc caller 0x400d60f8:0x400d62d3:0x400d630b:0x400d8050:0x400d6d4c:0x400d675c:0x400d6771:0x400d4df0:0x400e6c2d:
0x400d60f8: load_partitions at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:214
 (inlined by) ensure_partitions_loaded at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:74

0x400d62d3: esp_partition_find at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:87

0x400d630b: esp_partition_find_first at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/partition.c:140

0x400d8050: nvs::partition_lookup::lookup_nvs_partition(char const*, nvs::NVSPartition**) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_lookup.cpp:14

0x400d6d4c: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:45

0x400d675c: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

0x400d4df0: app_main at C:/Project/application\build_v5/../main/main.c:763 (discriminator 2)

0x400e6c2d: main_task at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/port_common.c:130

16 bytes (@ 0x3ffb48fc) allocated CPU 0 ccount 0x0515a814 caller 0x400d89f8:0x400d8064:0x400d6d4c:0x400d675c:0x400d6771:0x400d4df0:0x400e6c2d:
0x400d89f8: operator new(unsigned int, std::nothrow_t const&) at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/new_opnt.cc:43

0x400d8064: nvs::partition_lookup::lookup_nvs_partition(char const*, nvs::NVSPartition**) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_lookup.cpp:25

0x400d6d4c: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:45

0x400d675c: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

0x400d4df0: app_main at C:/Project/application\build_v5/../main/main.c:763 (discriminator 2)

0x400e6c2d: main_task at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/port_common.c:130

104 bytes (@ 0x3ffb4b00) allocated CPU 0 ccount 0x0515e2b0 caller 0x400d89f8:0x400d6c5c:0x400d6d66:0x400d675c:0x400d6771:0x400d4df0:0x400e6c2d:
0x400d89f8: operator new(unsigned int, std::nothrow_t const&) at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/new_opnt.cc:43

0x400d6c5c: nvs::NVSPartitionManager::init_custom(nvs::Partition*, unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:73

0x400d6d66: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:53

0x400d675c: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

0x400d4df0: app_main at C:/Project/application\build_v5/../main/main.c:763 (discriminator 2)

0x400e6c2d: main_task at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/port_common.c:130

5380 bytes (@ 0x3ffb4b7c) allocated CPU 0 ccount 0x05161290 caller 0x400d89f8:0x400d8a38:0x400d7d1a:0x400d69a2:0x400d6c89:0x400d6d66:0x400d675c:0x400d6771:0x400d4df0:0x400e6c2d
0x400d89f8: operator new(unsigned int, std::nothrow_t const&) at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/new_opnt.cc:43

0x400d8a38: operator new[](unsigned int, std::nothrow_t const&) at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/new_opvnt.cc:34

0x400d7d1a: nvs::PageManager::load(nvs::Partition*, unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_pagemanager.cpp:28 (discriminator 4)

0x400d69a2: nvs::Storage::init(unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_storage.cpp:91

0x400d6c89: nvs::NVSPartitionManager::init_custom(nvs::Partition*, unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:91

0x400d6d66: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:53

0x400d675c: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

0x400d4df0: app_main at C:/Project/application\build_v5/../main/main.c:763 (discriminator 2)

0x400e6c2d: main_task at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/port_common.c:130

128 bytes (@ 0x3ffb6094) allocated CPU 0 ccount 0x0518297c caller 0x400d89f8:0x400d6e31:0x400d79c0:0x400d7b89:0x400d7da2:0x400d69a2:0x400d6c89:0x400d6d66:0x400d675c:0x400d6771
0x400d89f8: operator new(unsigned int, std::nothrow_t const&) at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/new_opnt.cc:43

0x400d6e31: nvs::HashList::insert(nvs::Item const&, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_item_hash_list.cpp:59

0x400d79c0: nvs::Page::mLoadEntryTable() at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_page.cpp:699
 (inlined by) nvs::Page::mLoadEntryTable() at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_page.cpp:515

0x400d7b89: nvs::Page::load(nvs::Partition*, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_page.cpp:83

0x400d7da2: nvs::PageManager::load(nvs::Partition*, unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_pagemanager.cpp:33

0x400d69a2: nvs::Storage::init(unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_storage.cpp:91

0x400d6c89: nvs::NVSPartitionManager::init_custom(nvs::Partition*, unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:91

0x400d6d66: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:53

0x400d675c: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

128 bytes (@ 0x3ffb6128) allocated CPU 0 ccount 0x052382dc caller 0x400d89f8:0x400d6e31:0x400d79c0:0x400d7b89:0x400d7da2:0x400d69a2:0x400d6c89:0x400d6d66:0x400d675c:0x400d6771
0x400d89f8: operator new(unsigned int, std::nothrow_t const&) at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/new_opnt.cc:43

0x400d6e31: nvs::HashList::insert(nvs::Item const&, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_item_hash_list.cpp:59

0x400d79c0: nvs::Page::mLoadEntryTable() at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_page.cpp:699
 (inlined by) nvs::Page::mLoadEntryTable() at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_page.cpp:515

0x400d7b89: nvs::Page::load(nvs::Partition*, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_page.cpp:83

0x400d7da2: nvs::PageManager::load(nvs::Partition*, unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_pagemanager.cpp:33

0x400d69a2: nvs::Storage::init(unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_storage.cpp:91

0x400d6c89: nvs::NVSPartitionManager::init_custom(nvs::Partition*, unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:91

0x400d6d66: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:53

0x400d675c: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

128 bytes (@ 0x3ffb61bc) allocated CPU 0 ccount 0x05283b1c caller 0x400d89f8:0x400d6e31:0x400d7848:0x400d7b89:0x400d7da2:0x400d69a2:0x400d6c89:0x400d6d66:0x400d675c:0x400d6771
0x400d89f8: operator new(unsigned int, std::nothrow_t const&) at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/new_opnt.cc:43

0x400d6e31: nvs::HashList::insert(nvs::Item const&, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_item_hash_list.cpp:59

0x400d7848: nvs::Page::mLoadEntryTable() at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_page.cpp:625
 (inlined by) nvs::Page::mLoadEntryTable() at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_page.cpp:515

0x400d7b89: nvs::Page::load(nvs::Partition*, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_page.cpp:83

0x400d7da2: nvs::PageManager::load(nvs::Partition*, unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_pagemanager.cpp:33

0x400d69a2: nvs::Storage::init(unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_storage.cpp:91

0x400d6c89: nvs::NVSPartitionManager::init_custom(nvs::Partition*, unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:91

0x400d6d66: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:53

0x400d675c: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

28 bytes (@ 0x3ffb6250) allocated CPU 0 ccount 0x06750b9c caller 0x400d89f8:0x400d6a65:0x400d6c89:0x400d6d66:0x400d675c:0x400d6771:0x400d4df0:0x400e6c2d:
0x400d89f8: operator new(unsigned int, std::nothrow_t const&) at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/new_opnt.cc:43

0x400d6a65: nvs::Storage::init(unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_storage.cpp:105

0x400d6c89: nvs::NVSPartitionManager::init_custom(nvs::Partition*, unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:91

0x400d6d66: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:53

0x400d675c: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

0x400d4df0: app_main at C:/Project/application\build_v5/../main/main.c:763 (discriminator 2)

0x400e6c2d: main_task at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/port_common.c:130

28 bytes (@ 0x3ffb6280) allocated CPU 0 ccount 0x067584e0 caller 0x400d89f8:0x400d6a65:0x400d6c89:0x400d6d66:0x400d675c:0x400d6771:0x400d4df0:0x400e6c2d:
0x400d89f8: operator new(unsigned int, std::nothrow_t const&) at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/new_opnt.cc:43

0x400d6a65: nvs::Storage::init(unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_storage.cpp:105

0x400d6c89: nvs::NVSPartitionManager::init_custom(nvs::Partition*, unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:91

0x400d6d66: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:53

0x400d675c: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

0x400d4df0: app_main at C:/Project/application\build_v5/../main/main.c:763 (discriminator 2)

0x400e6c2d: main_task at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/port_common.c:130

28 bytes (@ 0x3ffb62b0) allocated CPU 0 ccount 0x0678354c caller 0x400d89f8:0x400d6a65:0x400d6c89:0x400d6d66:0x400d675c:0x400d6771:0x400d4df0:0x400e6c2d:
0x400d89f8: operator new(unsigned int, std::nothrow_t const&) at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/new_opnt.cc:43

0x400d6a65: nvs::Storage::init(unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_storage.cpp:105

0x400d6c89: nvs::NVSPartitionManager::init_custom(nvs::Partition*, unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:91

0x400d6d66: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:53

0x400d675c: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

0x400d4df0: app_main at C:/Project/application\build_v5/../main/main.c:763 (discriminator 2)

0x400e6c2d: main_task at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/port_common.c:130

28 bytes (@ 0x3ffb62e0) allocated CPU 0 ccount 0x06789fdc caller 0x400d89f8:0x400d6a65:0x400d6c89:0x400d6d66:0x400d675c:0x400d6771:0x400d4df0:0x400e6c2d:
0x400d89f8: operator new(unsigned int, std::nothrow_t const&) at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/new_opnt.cc:43

0x400d6a65: nvs::Storage::init(unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_storage.cpp:105

0x400d6c89: nvs::NVSPartitionManager::init_custom(nvs::Partition*, unsigned int, unsigned int) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:91

0x400d6d66: nvs::NVSPartitionManager::init_partition(char const*) at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_partition_manager.cpp:53

0x400d675c: nvs_flash_init_partition at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:135

0x400d6771: nvs_flash_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash/src/nvs_api.cpp:173

0x400d4df0: app_main at C:/Project/application\build_v5/../main/main.c:763 (discriminator 2)

0x400e6c2d: main_task at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/port_common.c:130

6556 bytes 'leaked' in trace (20 allocations)
total allocations 86 total frees 66
There's only one allocation that is different which is 29572 bytes and 5380 bytes for the respective partition table. This works out to around 84 bytes per page in either case.

Am I missing something here? Any help is appreciated.

ESP_rrtandler
Posts: 18
Joined: Wed May 31, 2023 6:54 pm

Re: Disparity in Heap Needed for NVS Library Initialization

Postby ESP_rrtandler » Thu Mar 28, 2024 11:12 am

Hello squirtle321,

The RAM footprint of NVS after initialisation is comprised of 2 components:
  • Item Hash List (namespace, key, chunk index) - size depends on number of active key-value pairs
  • Page manager related footprint - size depends on NVS partition size
Run your statistics with various NVS partition sizes to get an idea of the RAM overhead to NVS partition size relationship. Scale your NVS partition sizes on multiples of page size (4096) bytes to get the best results.

ESP_rrtandler
Posts: 18
Joined: Wed May 31, 2023 6:54 pm

Re: Disparity in Heap Needed for NVS Library Initialization

Postby ESP_rrtandler » Thu Mar 28, 2024 11:53 am

Hi squirtle321,

One more note. You may also try to run tests with the same NVS partition size and vary the number of different key - value pairs to see the influence of active data amount on the Key Hash Map heap overhead.

Start with empty NVS, make nvs_init and the heap overhead (nvs partition size dependent at this moment) will be related to the Page manager only. Create namespace and write 100 new different keys and observe the heap consumed. Delta heap space related to the active key-value pairs will be consumed during the writing of new keys (namespace is also key-value pair).

Reset the device and run nvs_init with namespace and 100 keys of data created by previous step already in NVS flash. The heap allocation will include both the Page manager (nvs partition size dependent) as well as Key Hash Map (number of active key-value pairs dependent) overheads.

Who is online

Users browsing this forum: Bing [Bot], cdollar, Ethapus and 214 guests