Index: src/zone.h |
diff --git a/src/zone.h b/src/zone.h |
index 1bc4984aa2520b0b8d84831290741252e189ee69..01e887e779d70377db2c8a80e653e94b53d7f2e9 100644 |
--- a/src/zone.h |
+++ b/src/zone.h |
@@ -64,6 +64,8 @@ class Isolate; |
class Zone { |
public: |
+ explicit Zone(Isolate* isolate); |
+ ~Zone() { DeleteKeptSegment(); } |
// Allocate 'size' bytes of memory in the Zone; expands the Zone by |
// allocating new segments of memory on demand using malloc(). |
inline void* New(int size); |
@@ -114,9 +116,6 @@ class Zone { |
// the zone. |
int segment_bytes_allocated_; |
- // Each isolate gets its own zone. |
- Zone(); |
- |
// Expand the Zone to hold at least 'size' more bytes and allocate |
// the bytes. Returns the address of the newly allocated chunk of |
// memory in the Zone. Should only be called if there isn't enough |
@@ -235,7 +234,7 @@ class ZoneList: public List<T, ZoneAllocationPolicy> { |
// outer-most scope. |
class ZoneScope BASE_EMBEDDED { |
public: |
- INLINE(ZoneScope(Isolate* isolate, ZoneScopeMode mode)); |
+ INLINE(ZoneScope(Zone* zone, ZoneScopeMode mode)); |
virtual ~ZoneScope(); |
@@ -250,7 +249,7 @@ class ZoneScope BASE_EMBEDDED { |
inline static int nesting(); |
private: |
- Isolate* isolate_; |
+ Zone* zone_; |
ZoneScopeMode mode_; |
}; |