Index: src/zone/zone.h |
diff --git a/src/zone/zone.h b/src/zone/zone.h |
index ad64af27f699d62eea0a1b0ce7123fe92fb6af2e..40fd1a82c30c98a425552580fc949062686832f5 100644 |
--- a/src/zone/zone.h |
+++ b/src/zone/zone.h |
@@ -44,14 +44,6 @@ class Zone final { |
return static_cast<T*>(New(length * sizeof(T))); |
} |
- // Deletes all objects and free all memory allocated in the Zone. Keeps one |
- // small (size <= kMaximumKeptSegmentSize) segment around if it finds one. |
- void DeleteAll(); |
- |
- // Deletes the last small segment kept around by DeleteAll(). You |
- // may no longer allocate in the Zone after a call to this method. |
- void DeleteKeptSegment(); |
- |
// Returns true if more memory has been allocated in zones than |
// the limit allows. |
bool excess_allocation() const { |
@@ -62,6 +54,9 @@ class Zone final { |
AccountingAllocator* allocator() const { return allocator_; } |
+ // Deletes all objects and free all memory allocated in the Zone. |
+ void DeleteAll(); |
+ |
private: |
// All pointers returned from New() have this alignment. In addition, if the |
// object being allocated has a size that is divisible by 8 then its alignment |
@@ -79,9 +74,6 @@ class Zone final { |
// Never allocate segments larger than this size in bytes. |
static const size_t kMaximumSegmentSize = 1 * MB; |
- // Never keep segments larger than this size in bytes around. |
- static const size_t kMaximumKeptSegmentSize = 64 * KB; |
- |
// Report zone excess when allocation exceeds this limit. |
static const size_t kExcessLimit = 256 * MB; |
@@ -133,19 +125,6 @@ class ZoneObject { |
void operator delete(void* pointer, Zone* zone) { UNREACHABLE(); } |
}; |
-// The ZoneScope is used to automatically call DeleteAll() on a |
-// Zone when the ZoneScope is destroyed (i.e. goes out of scope) |
-class ZoneScope final { |
- public: |
- explicit ZoneScope(Zone* zone) : zone_(zone) {} |
- ~ZoneScope() { zone_->DeleteAll(); } |
- |
- Zone* zone() const { return zone_; } |
- |
- private: |
- Zone* zone_; |
-}; |
- |
// The ZoneAllocationPolicy is used to specialize generic data |
// structures to allocate themselves and their elements in the Zone. |
class ZoneAllocationPolicy final { |