Memory Test for memory leak or fragmentation

Currently I only monitor the largest_free_block_heap of every Electron in the field as an indicator and its is about 86640. The rest of the parameters is 100% constant. I use the code exactly as used by Elco.

runtime_info_t info;

memset(&info, 0, sizeof(info));
info.size = sizeof(info);
HAL_Core_Runtime_Info(&info, NULL);
Serial.println("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
Serial.println(info.size);
Serial.println(info.flags);
Serial.println(info.system_version);
Serial.println(info.total_init_heap);
Serial.println(info.total_heap);
Serial.println(info.max_used_heap);
Serial.println(info.user_static_ram);
Serial.println(info.largest_free_block_heap);
Serial.println("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
1 Like