Report memory usage in MB.
This commit is contained in:
		
							parent
							
								
									3ad29f6eb7
								
							
						
					
					
						commit
						b683d84df1
					
				
					 1 changed files with 9 additions and 8 deletions
				
			
		| 
						 | 
					@ -750,18 +750,19 @@ void psWriteDump() {
 | 
				
			||||||
			GetCurrentProcess(),
 | 
								GetCurrentProcess(),
 | 
				
			||||||
			&data,
 | 
								&data,
 | 
				
			||||||
			sizeof(data))) {
 | 
								sizeof(data))) {
 | 
				
			||||||
 | 
							const auto mb = 1024 * 1024;
 | 
				
			||||||
		CrashReports::dump()
 | 
							CrashReports::dump()
 | 
				
			||||||
			<< "Memory-usage: "
 | 
								<< "Memory-usage: "
 | 
				
			||||||
			<< data.PeakWorkingSetSize
 | 
								<< (data.PeakWorkingSetSize / mb)
 | 
				
			||||||
			<< " (peak), "
 | 
								<< " MB (peak), "
 | 
				
			||||||
			<< data.WorkingSetSize
 | 
								<< (data.WorkingSetSize / mb)
 | 
				
			||||||
			<< " (current)\n";
 | 
								<< " MB (current)\n";
 | 
				
			||||||
		CrashReports::dump()
 | 
							CrashReports::dump()
 | 
				
			||||||
			<< "Pagefile-usage: "
 | 
								<< "Pagefile-usage: "
 | 
				
			||||||
			<< data.PeakPagefileUsage
 | 
								<< (data.PeakPagefileUsage / mb)
 | 
				
			||||||
			<< " (peak), "
 | 
								<< " MB (peak), "
 | 
				
			||||||
			<< data.PagefileUsage
 | 
								<< (data.PagefileUsage / mb)
 | 
				
			||||||
			<< " (current)\n";
 | 
								<< " MB (current)\n";
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
#endif // TDESKTOP_DISABLE_CRASH_REPORTS
 | 
					#endif // TDESKTOP_DISABLE_CRASH_REPORTS
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue