| Index: src/zone/zone.cc
|
| diff --git a/src/zone/zone.cc b/src/zone/zone.cc
|
| index 8dd96dc1cd63319175e428f633491e305cf8e12f..b50657d555f3a80b1da34debc3e8d5abd6ca9d52 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, kAlignmentInBytes);
|
|
|
|
|