Fix executable memory setting and fix test.
authorager@chromium.org <ager@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 10 Nov 2010 09:20:08 +0000 (09:20 +0000)
committerager@chromium.org <ager@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 10 Nov 2010 09:20:08 +0000 (09:20 +0000)
Review URL: http://codereview.chromium.org/4764002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5800 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/heap.cc
src/spaces.cc
test/cctest/test-mark-compact.cc

index e58c9be..cf1892d 100644 (file)
@@ -4346,7 +4346,7 @@ bool Heap::ConfigureHeap(int max_semispace_size,
 
   if (max_old_gen_size > 0) max_old_generation_size_ = max_old_gen_size;
   if (max_executable_size > 0) {
-    max_executable_size_ = RoundUp(max_executable_size_, Page::kPageSize);
+    max_executable_size_ = RoundUp(max_executable_size, Page::kPageSize);
   }
 
   // The new space size must be a power of two to support single-bit testing
index b68f6c8..2f3e41a 100644 (file)
@@ -270,9 +270,9 @@ void CodeRange::TearDown() {
 // -----------------------------------------------------------------------------
 // MemoryAllocator
 //
-intptr_t MemoryAllocator::capacity_   = 0;
+intptr_t MemoryAllocator::capacity_ = 0;
 intptr_t MemoryAllocator::capacity_executable_ = 0;
-intptr_t MemoryAllocator::size_       = 0;
+intptr_t MemoryAllocator::size_ = 0;
 intptr_t MemoryAllocator::size_executable_ = 0;
 
 List<MemoryAllocator::MemoryAllocationCallbackRegistration>
index 406d115..9942567 100644 (file)
@@ -75,7 +75,7 @@ TEST(Promotion) {
   // from new space.
   FLAG_gc_global = true;
   FLAG_always_compact = true;
-  Heap::ConfigureHeap(2*256*KB, 4*MB, 0);
+  Heap::ConfigureHeap(2*256*KB, 4*MB, 4*MB);
 
   InitializeVM();
 
@@ -101,7 +101,7 @@ TEST(Promotion) {
 
 
 TEST(NoPromotion) {
-  Heap::ConfigureHeap(2*256*KB, 4*MB, 0);
+  Heap::ConfigureHeap(2*256*KB, 4*MB, 4*MB);
 
   // Test the situation that some objects in new space are promoted to
   // the old space