Fix integer division truncation error.

Review URL: https://chromiumcodereview.appspot.com/10831148
Patch from Nico Weber <thakis@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12261 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 182b0bfb
......@@ -601,7 +601,7 @@ void MarkCompactCollector::CollectEvacuationCandidates(PagedSpace* space) {
static const int kMaxMaxEvacuationCandidates = 1000;
int number_of_pages = space->CountTotalPages();
int max_evacuation_candidates =
static_cast<int>(sqrt(static_cast<double>(number_of_pages / 2)) + 1);
static_cast<int>(sqrt(number_of_pages / 2.0) + 1);
if (FLAG_stress_compaction || FLAG_always_compact) {
max_evacuation_candidates = kMaxMaxEvacuationCandidates;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment