Index: src/deoptimizer.cc |
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc |
index 5b65e648bd8a6a281cd4cd77cf3781cfcfd56d46..9d16211f767a8f10b3e253526f273c7dce6e225e 100644 |
--- a/src/deoptimizer.cc |
+++ b/src/deoptimizer.cc |
@@ -108,9 +108,10 @@ static const int kDeoptTableMaxEpilogueCodeSize = 2 * KB; |
size_t Deoptimizer::GetMaxDeoptTableSize() { |
int entries_size = |
Deoptimizer::kMaxNumberOfEntries * Deoptimizer::table_entry_size_; |
+ int commit_page_size = static_cast<int>(OS::CommitPageSize()); |
int page_count = ((kDeoptTableMaxEpilogueCodeSize + entries_size - 1) / |
- OS::CommitPageSize()) + 1; |
- return OS::CommitPageSize() * page_count; |
+ commit_page_size) + 1; |
+ return static_cast<size_t>(commit_page_size * page_count); |
} |