v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
zone-segment.cc
Go to the documentation of this file.
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/base/sanitizer/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
v8::internal::Segment
Definition
zone-segment.h:22
v8::internal::Segment::start
Address start() const
Definition
zone-segment.h:38
v8::internal::Segment::ZapHeader
void ZapHeader()
Definition
zone-segment.cc:19
v8::internal::Segment::capacity
size_t capacity() const
Definition
zone-segment.h:36
v8::internal::Segment::ZapContents
void ZapContents()
Definition
zone-segment.cc:12
msan.h
MSAN_ALLOCATED_UNINITIALIZED_MEMORY
#define MSAN_ALLOCATED_UNINITIALIZED_MEMORY(start, size)
Definition
msan.h:29
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
v8
Definition
api-arguments-inl.h:19
zone-segment.h
src
zone
zone-segment.cc
Generated on Sun Apr 6 2025 21:08:58 for v8 by
1.12.0