Merge r3655, r3657, and r3672 from bleeding_edge to
trunk to fix issues with the new map space compaction
code.
Merge r3680 from bleeding_edge to trunk to fix issue 589.
Review URL: http://codereview.chromium.org/548136
git-svn-id: http://v8.googlecode.com/svn/trunk@3686 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/heap.cc b/src/heap.cc
index fba2e87..410514a 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -3544,7 +3544,8 @@
// Initialize map space.
map_space_ = new MapSpace(FLAG_use_big_map_space
? max_old_generation_size_
- : (MapSpace::kMaxMapPageIndex + 1) * Page::kPageSize,
+ : MapSpace::kMaxMapPageIndex * Page::kPageSize,
+ FLAG_max_map_space_pages,
MAP_SPACE);
if (map_space_ == NULL) return false;
if (!map_space_->Setup(NULL, 0)) return false;