Index: src/zone/zone.cc |
diff --git a/src/zone/zone.cc b/src/zone/zone.cc |
index 05d68defcd68f6810bd3c83e78d45e4bd79e2762..719a461cf1adab62cdb1f6eb588a4edb88d1639f 100644 |
--- a/src/zone/zone.cc |
+++ b/src/zone/zone.cc |
@@ -49,7 +49,8 @@ Zone::Zone(AccountingAllocator* allocator, const char* name) |
limit_(0), |
allocator_(allocator), |
segment_head_(nullptr), |
- name_(name) { |
+ name_(name), |
+ sealed_(false) { |
allocator_->ZoneCreation(this); |
} |
@@ -62,6 +63,8 @@ Zone::~Zone() { |
} |
void* Zone::New(size_t size) { |
+ CHECK(!sealed_); |
+ |
// Round up the requested size to fit the alignment. |
size = RoundUp(size, kAlignment); |