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

Unified Diff: third_party/re2/re2/dfa.cc

Issue 11819038: re2 building on x64 windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: just a couple minor non-sign-changing fixes, and disable c4267 Created 7 years, 11 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
Index: third_party/re2/re2/dfa.cc
diff --git a/third_party/re2/re2/dfa.cc b/third_party/re2/re2/dfa.cc
index 32c8c33b8384243226c7893a475c75d0d3c39507..36ec66f2f2742c8a79c8d29d9209f566d46bb8df 100644
--- a/third_party/re2/re2/dfa.cc
+++ b/third_party/re2/re2/dfa.cc
@@ -470,8 +470,8 @@ DFA::DFA(Prog* prog, Prog::MatchKind kind, int64 max_mem)
// At minimum, the search requires room for two states in order
// to limp along, restarting frequently. We'll get better performance
// if there is room for a larger number of states, say 20.
- int one_state = sizeof(State) + (prog_->size()+nmark)*sizeof(int) +
- (prog_->bytemap_range()+1)*sizeof(State*);
+ size_t one_state = sizeof(State) + (prog_->size()+nmark)*sizeof(int) +
+ (prog_->bytemap_range()+1)*sizeof(State*);
if (state_budget_ < 20*one_state) {
scottmg 2013/01/09 22:28:34 state_budget_ is int64, and one_state's value is a
LOG(INFO) << StringPrintf("DFA out of memory: prog size %lld mem %lld",
prog_->size(), max_mem);

Powered by Google App Engine
This is Rietveld 408576698