Line data Source code
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 52040496 : void Segment::ZapContents() {
13 : #ifdef DEBUG
14 : memset(reinterpret_cast<void*>(start()), kZapDeadByte, capacity());
15 : #endif
16 : MSAN_ALLOCATED_UNINITIALIZED_MEMORY(start(), capacity());
17 52040496 : }
18 :
19 26175242 : void Segment::ZapHeader() {
20 : #ifdef DEBUG
21 : memset(this, kZapDeadByte, sizeof(Segment));
22 : #endif
23 : MSAN_ALLOCATED_UNINITIALIZED_MEMORY(start(), sizeof(Segment));
24 26175242 : }
25 :
26 : } // namespace internal
27 : } // namespace v8
|