summaryrefslogtreecommitdiff
path: root/deps/v8/src/zone/zone.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/zone/zone.cc')
-rw-r--r--deps/v8/src/zone/zone.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/deps/v8/src/zone/zone.cc b/deps/v8/src/zone/zone.cc
index 295d7815cb..a851f6797a 100644
--- a/deps/v8/src/zone/zone.cc
+++ b/deps/v8/src/zone/zone.cc
@@ -43,7 +43,6 @@ Zone::Zone(AccountingAllocator* allocator, const char* name,
Zone::~Zone() {
allocator_->ZoneDestruction(this);
-
DeleteAll();
DCHECK_EQ(segment_bytes_allocated_, 0);
@@ -77,6 +76,12 @@ void* Zone::New(size_t size) {
return reinterpret_cast<void*>(result);
}
+void Zone::ReleaseMemory() {
+ allocator_->ZoneDestruction(this);
+ DeleteAll();
+ allocator_->ZoneCreation(this);
+}
+
void Zone::DeleteAll() {
// Traverse the chained list of segments and return them all to the allocator.
for (Segment* current = segment_head_; current;) {