Reviewers: Mads Ager,

Description:
Revert 8133: Lower heap size limits on systems that are short of virtual memory.

Please review this at http://codereview.chromium.org/7104048/

SVN Base: http://v8.googlecode.com/svn/trunk/

Affected files:
  M     ChangeLog
  M     src/heap.cc
  M     src/platform-posix.cc
  M     src/platform-win32.cc
  M     src/platform.h
  M     src/version.cc


Index: ChangeLog
===================================================================
--- ChangeLog   (revision 8209)
+++ ChangeLog   (working copy)
@@ -1,3 +1,10 @@
+2011-06-06: Version 3.4.2.1
+
+        Reverted 8133: Lower heap size limits on systems that are short
+        of virtual memory.  It was causing problems with layout tests on
+        MacOS.
+
+
 2011-06-06: Version 3.4.2

         More work on ES-Harmony proxies.  Still hidden behind a flag.
Index: src/heap.cc
===================================================================
--- src/heap.cc (revision 8209)
+++ src/heap.cc (working copy)
@@ -153,29 +153,6 @@
   max_semispace_size_ = reserved_semispace_size_ = V8_MAX_SEMISPACE_SIZE;
 #endif

-  intptr_t max_virtual = OS::MaxVirtualMemory();
-
-  if (max_virtual > 0) {
-    intptr_t half = max_virtual >> 1;
-    intptr_t quarter = max_virtual >> 2;
- // If we have limits on the amount of virtual memory we can use then we may - // be forced to lower the allocation limits. We reserve one quarter of the - // memory for young space and off-heap data. The rest is distributed as
-    // described below.
-    if (code_range_size_ > 0) {
-      // Reserve a quarter of the memory for the code range.  The old space
-      // heap gets the remaining half.  There is some unavoidable double
- // counting going on here since the heap size is measured in committed
-      // virtual memory and the code range is only reserved virtual memory.
-      code_range_size_ = Min(code_range_size_, quarter);
-      max_old_generation_size_ = Min(max_old_generation_size_, half);
-    } else {
- // Reserve three quarters of the memory for the old space heap including
-      // the executable code.
- max_old_generation_size_ = Min(max_old_generation_size_, half + quarter);
-    }
-  }
-
   memset(roots_, 0, sizeof(roots_[0]) * kRootListLength);
   global_contexts_list_ = NULL;
   mark_compact_collector_.heap_ = this;
Index: src/platform-posix.cc
===================================================================
--- src/platform-posix.cc       (revision 8209)
+++ src/platform-posix.cc       (working copy)
@@ -54,18 +54,6 @@
 namespace v8 {
 namespace internal {

-
-// Maximum size of the virtual memory.  0 means there is no artificial
-// limit.
-
-intptr_t OS::MaxVirtualMemory() {
-  struct rlimit limit;
-  int result = getrlimit(RLIMIT_DATA, &limit);
-  if (result != 0) return 0;
-  return limit.rlim_cur;
-}
-
-
// ----------------------------------------------------------------------------
 // Math functions

Index: src/platform-win32.cc
===================================================================
--- src/platform-win32.cc       (revision 8209)
+++ src/platform-win32.cc       (working copy)
@@ -44,11 +44,6 @@
 namespace v8 {
 namespace internal {

-intptr_t OS::MaxVirtualMemory() {
-  return 0;
-}
-
-
 // Test for finite value - usually defined in math.h
 int isfinite(double x) {
   return _finite(x);
Index: src/platform.h
===================================================================
--- src/platform.h      (revision 8209)
+++ src/platform.h      (working copy)
@@ -288,10 +288,6 @@
// positions indicated by the members of the CpuFeature enum from globals.h
   static uint64_t CpuFeaturesImpliedByPlatform();

-  // Maximum size of the virtual memory.  0 means there is no artificial
-  // limit.
-  static intptr_t MaxVirtualMemory();
-
   // Returns the double constant NAN
   static double nan_value();

Index: src/version.cc
===================================================================
--- src/version.cc      (revision 8209)
+++ src/version.cc      (working copy)
@@ -35,7 +35,7 @@
 #define MAJOR_VERSION     3
 #define MINOR_VERSION     4
 #define BUILD_NUMBER      2
-#define PATCH_LEVEL       0
+#define PATCH_LEVEL       1
 // Use 1 for candidates and 0 otherwise.
 // (Boolean macro values are not supported by all preprocessors.)
 #define IS_CANDIDATE_VERSION 0


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to