Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(932)

Unified Diff: base/trace_event/memory_dump_scheduler.cc

Issue 2775663003: [memory-infra] Fix base_unittests on CFI bots (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698