From dce010395d13cd3e188ffd45de6b80c9db02df24 Mon Sep 17 00:00:00 2001 From: "bmeurer@chromium.org" Date: Thu, 27 Jun 2013 13:10:43 +0000 Subject: [PATCH] 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. R=danno@chromium.org BUG= Review URL: https://codereview.chromium.org/18034006 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15354 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/zone-inl.h | 2 +- src/zone.cc | 3 +-- src/zone.h | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/zone-inl.h b/src/zone-inl.h index b498ea7..49e7626 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; } diff --git a/src/zone.cc b/src/zone.cc index 0555f5d..82a2efa 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), diff --git a/src/zone.h b/src/zone.h index e6a2008..5545e3c 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_; -- 2.7.4