Less sensitive memory default thresholds
This commit is contained in:
parent
04419c8cdf
commit
1ac6729ef1
@ -84,9 +84,12 @@ std::string mem_string( const MemoryStatus & mem_status,
|
||||
break;
|
||||
}
|
||||
default: // Default mode, just show the used/total memory in MB
|
||||
if(mem_status.used_mem>100000 && mem_status.total_mem>100000) oss<<static_cast<unsigned int>(mem_status.used_mem/1024)<<"/"<<static_cast<unsigned int>(mem_status.total_mem/1024)<<"GB";
|
||||
else if(mem_status.used_mem<100000 && mem_status.total_mem>100000) oss<<static_cast<unsigned int>(mem_status.used_mem)<<"MB/"<<static_cast<unsigned int>(mem_status.total_mem/1024)<<"GB";
|
||||
else oss<<static_cast<unsigned int>(mem_status.used_mem)<<"/"<<static_cast<unsigned int>(mem_status.total_mem)<<"MB";
|
||||
if(mem_status.used_mem>10000 && mem_status.total_mem>10000)
|
||||
oss<<static_cast<unsigned int>(mem_status.used_mem/1024)<<"/"<<static_cast<unsigned int>(mem_status.total_mem/1024)<<"GB";
|
||||
else if(mem_status.used_mem<10000 && mem_status.total_mem>10000)
|
||||
oss<<static_cast<unsigned int>(mem_status.used_mem)<<"MB/"<<static_cast<unsigned int>(mem_status.total_mem/1024)<<"GB";
|
||||
else
|
||||
oss<<static_cast<unsigned int>(mem_status.used_mem)<<"/"<<static_cast<unsigned int>(mem_status.total_mem)<<"MB";
|
||||
}
|
||||
|
||||
if( use_colors )
|
||||
|
Loading…
Reference in New Issue
Block a user