MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / log_memory_info

Function log_memory_info

TactilityKernel/source/crash.cpp:7–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5static const auto* TAG = "Kernel";
6
7static void log_memory_info() {
8#ifdef ESP_PLATFORM
9 LOG_E(TAG, "Default memory caps:");
10 LOG_E(TAG, " Total: %" PRIu64, static_cast<uint64_t>(heap_caps_get_total_size(MALLOC_CAP_DEFAULT)));
11 LOG_E(TAG, " Free: %" PRIu64, static_cast<uint64_t>(heap_caps_get_free_size(MALLOC_CAP_DEFAULT)));
12 LOG_E(TAG, " Min free: %" PRIu64, static_cast<uint64_t>(heap_caps_get_minimum_free_size(MALLOC_CAP_DEFAULT)));
13 LOG_E(TAG, "Internal memory caps:");
14 LOG_E(TAG, " Total: %" PRIu64, static_cast<uint64_t>(heap_caps_get_total_size(MALLOC_CAP_INTERNAL)));
15 LOG_E(TAG, " Free: %" PRIu64, static_cast<uint64_t>(heap_caps_get_free_size(MALLOC_CAP_INTERNAL)));
16 LOG_E(TAG, " Min free: %" PRIu64, static_cast<uint64_t>(heap_caps_get_minimum_free_size(MALLOC_CAP_INTERNAL)));
17#endif
18}
19
20static void log_task_info() {
21 const char* name = pcTaskGetName(nullptr);

Callers 1

__crashFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected