Reviewers: danno,

Description:
Turn zone_excess_limit_ into a constant.

The zone_excess_limit_ is not changed at runtime, and there seems to
be no obvious reason to do so in the future.

[email protected]
BUG=

Please review this at https://codereview.chromium.org/18034006/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/zone-inl.h
  M src/zone.h
  M src/zone.cc


Index: src/zone-inl.h
diff --git a/src/zone-inl.h b/src/zone-inl.h
index b498ea776b75f2a77b61cb39ecefb77f418a1e80..49e7626f74ecbc4a63bd48a1daeb57a78a37489f 100644
--- a/src/zone-inl.h
+++ b/src/zone-inl.h
@@ -74,7 +74,7 @@ T* Zone::NewArray(int length) {


 bool Zone::excess_allocation() {
-  return segment_bytes_allocated_ > zone_excess_limit_;
+  return segment_bytes_allocated_ > kExcessLimit;
 }


Index: src/zone.cc
diff --git a/src/zone.cc b/src/zone.cc
index 0555f5da8ff88d3a593d71e3f9fee096ff44bf31..82a2efa94ea90e8cf0d30cc611e61dc9bc97523e 100644
--- a/src/zone.cc
+++ b/src/zone.cc
@@ -68,8 +68,7 @@ class Segment {


 Zone::Zone(Isolate* isolate)
-    : zone_excess_limit_(256 * MB),
-      allocation_size_(0),
+    : allocation_size_(0),
       segment_bytes_allocated_(0),
       position_(0),
       limit_(0),
Index: src/zone.h
diff --git a/src/zone.h b/src/zone.h
index e6a200871c9aa3ef9a198c639c4ef95b2a5275e5..5545e3cede6dc6b80ed3a2a517b771256a5f6790 100644
--- a/src/zone.h
+++ b/src/zone.h
@@ -91,7 +91,7 @@ class Zone {
   static const int kMaximumSegmentSize = 1 * MB;

   // Report zone excess when allocation exceeds this limit.
-  int zone_excess_limit_;
+  static const int kExcessLimit = 256 * MB;

   // The number of bytes allocated in this zone so far.
   unsigned allocation_size_;


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to