Index: base/trace_event/memory_dump_scheduler.cc |
diff --git a/base/trace_event/memory_dump_scheduler.cc b/base/trace_event/memory_dump_scheduler.cc |
index eaa8d63661ca6d7bad289330cfa21f775a1ee07f..df4d1353d9c3be3185ea6ef68c873a3fb7220007 100644 |
--- a/base/trace_event/memory_dump_scheduler.cc |
+++ b/base/trace_event/memory_dump_scheduler.cc |
@@ -282,8 +282,11 @@ void MemoryDumpScheduler::PollingTriggerState::ResetTotals() { |
// Set threshold to 1% of total system memory. |
SystemMemoryInfoKB meminfo; |
bool res = GetSystemMemoryInfo(&meminfo); |
- if (res) |
- memory_increase_threshold = (meminfo.total / 100) * 1024; |
+ if (res) { |
+ memory_increase_threshold = |
+ (static_cast<int64_t>(meminfo.total) / 100) * 1024; |
+ } |
+ DCHECK_GT(memory_increase_threshold, 0u); |
#endif |
} |