| Index: src/zone/zone.cc
|
| diff --git a/src/zone/zone.cc b/src/zone/zone.cc
|
| index 91506dd6d206fbba28653483de5beca4011cc9d5..a43aea5bb7ca8e82adb6d13c910be107beb50027 100644
|
| --- a/src/zone/zone.cc
|
| +++ b/src/zone/zone.cc
|
| @@ -112,9 +112,8 @@ void Zone::DeleteAll() {
|
| #ifdef DEBUG
|
| // Un-poison first so the zapping doesn't trigger ASan complaints.
|
| ASAN_UNPOISON_MEMORY_REGION(current, size);
|
| - // Zap the entire current segment (including the header).
|
| - memset(current, kZapDeadByte, size);
|
| #endif
|
| + current->ZapContents();
|
| segment_bytes_allocated_ -= size;
|
| allocator_->FreeSegment(current);
|
| }
|
| @@ -131,10 +130,7 @@ void Zone::DeleteAll() {
|
| limit_ = keep->end();
|
| // Un-poison so we can re-use the segment later.
|
| ASAN_UNPOISON_MEMORY_REGION(start, keep->capacity());
|
| -#ifdef DEBUG
|
| - // Zap the contents of the kept segment (but not the header).
|
| - memset(start, kZapDeadByte, keep->capacity());
|
| -#endif
|
| + keep->ZapContents();
|
| } else {
|
| position_ = limit_ = 0;
|
| }
|
|
|