V8 API Reference, 7.2.502.16 (for Deno 0.2.4)
zone-segment.cc
1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "src/zone/zone-segment.h"
6 
7 #include "src/msan.h"
8 
9 namespace v8 {
10 namespace internal {
11 
12 void Segment::ZapContents() {
13 #ifdef DEBUG
14  memset(reinterpret_cast<void*>(start()), kZapDeadByte, capacity());
15 #endif
16  MSAN_ALLOCATED_UNINITIALIZED_MEMORY(start(), capacity());
17 }
18 
19 void Segment::ZapHeader() {
20 #ifdef DEBUG
21  memset(this, kZapDeadByte, sizeof(Segment));
22 #endif
23  MSAN_ALLOCATED_UNINITIALIZED_MEMORY(start(), sizeof(Segment));
24 }
25 
26 } // namespace internal
27 } // namespace v8
Definition: libplatform.h:13