From 1e462be4ab519ce2e54a95cb3b4426e914b76f18 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Fri, 20 Mar 2020 13:42:53 +0100 Subject: [PATCH] examples: print free heap size in hello_world example --- examples/get-started/hello_world/main/hello_world_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/get-started/hello_world/main/hello_world_main.c b/examples/get-started/hello_world/main/hello_world_main.c index e77056c6c..1bbb22790 100644 --- a/examples/get-started/hello_world/main/hello_world_main.c +++ b/examples/get-started/hello_world/main/hello_world_main.c @@ -31,6 +31,8 @@ void app_main(void) printf("%dMB %s flash\n", spi_flash_get_chip_size() / (1024 * 1024), (chip_info.features & CHIP_FEATURE_EMB_FLASH) ? "embedded" : "external"); + printf("Free heap: %d\n", esp_get_free_heap_size()); + for (int i = 10; i >= 0; i--) { printf("Restarting in %d seconds...\n", i); vTaskDelay(1000 / portTICK_PERIOD_MS);