version 4.5.0
PIThread::stopAndWait now returns bool PIKbdListener on Linux now use piwaitevent_p and can immediately stop new base method piZeroMemory, also migrate all "memset 0" to piZeroMemory
This commit is contained in:
@@ -405,7 +405,7 @@ float PISystemMonitor::calcThreadUsage(PISystemTime & t_new, PISystemTime & t_ol
|
||||
ullong PISystemMonitor::totalRAM() {
|
||||
#ifdef ESP_PLATFORM
|
||||
multi_heap_info_t heap_info;
|
||||
memset(&heap_info, 0, sizeof(multi_heap_info_t));
|
||||
piZeroMemory(heap_info);
|
||||
heap_caps_get_info(&heap_info, MALLOC_CAP_8BIT);
|
||||
return heap_info.total_allocated_bytes + heap_info.total_free_bytes;
|
||||
#endif
|
||||
@@ -416,7 +416,7 @@ ullong PISystemMonitor::totalRAM() {
|
||||
ullong PISystemMonitor::freeRAM() {
|
||||
#ifdef ESP_PLATFORM
|
||||
multi_heap_info_t heap_info;
|
||||
memset(&heap_info, 0, sizeof(multi_heap_info_t));
|
||||
piZeroMemory(heap_info);
|
||||
heap_caps_get_info(&heap_info, MALLOC_CAP_8BIT);
|
||||
return heap_info.total_free_bytes;
|
||||
#endif
|
||||
@@ -427,7 +427,7 @@ ullong PISystemMonitor::freeRAM() {
|
||||
ullong PISystemMonitor::usedRAM() {
|
||||
#ifdef ESP_PLATFORM
|
||||
multi_heap_info_t heap_info;
|
||||
memset(&heap_info, 0, sizeof(multi_heap_info_t));
|
||||
piZeroMemory(heap_info);
|
||||
heap_caps_get_info(&heap_info, MALLOC_CAP_8BIT);
|
||||
return heap_info.total_allocated_bytes;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user