Added DRAM/IRAM memory stats to 'm' CLI command

This commit is contained in:
Gregg 2023-07-05 06:05:10 -05:00
parent 3d45c7d120
commit db0f522297
1 changed files with 7 additions and 1 deletions

View File

@ -831,7 +831,13 @@ void Span::processSerialCommand(const char *c){
break;
case 'm': {
LOG0("Free Memory: %d bytes\n",heap_caps_get_free_size(MALLOC_CAP_DEFAULT));
multi_heap_info_t heapInfo;
heap_caps_get_info(&heapInfo,MALLOC_CAP_INTERNAL);
LOG0("Total Heap=%d ",heapInfo.total_free_bytes);
heap_caps_get_info(&heapInfo,MALLOC_CAP_DEFAULT);
LOG0("DRAM-Capable=%d ",heapInfo.total_free_bytes);
heap_caps_get_info(&heapInfo,MALLOC_CAP_EXEC);
LOG0("IRAM-Capable=%d\n",heapInfo.total_free_bytes);
}
break;