v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
heap-object-header.cc
Go to the documentation of this file.
1// Copyright 2020 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
6
9#include "src/base/macros.h"
14
15namespace cppgc {
16namespace internal {
17
18static_assert((kAllocationGranularity % sizeof(HeapObjectHeader)) == 0);
19
26
28#ifdef V8_USE_ADDRESS_SANITIZER
29 const size_t size =
32 : ObjectSize();
34#endif // V8_USE_ADDRESS_SANITIZER
36 if (gc_info.finalize) {
37 gc_info.finalize(ObjectStart());
38 }
39}
40
42 return GetName(BasePage::FromPayload(this)->heap().name_of_unnamed_object());
43}
44
46 HeapObjectNameForUnnamedObject heap_object_name) const {
48 return gc_info.name(ObjectStart(), heap_object_name);
49}
50
55
56} // namespace internal
57} // namespace cppgc
#define ASAN_UNPOISON_MEMORY_REGION(start, size)
Definition asan.h:71
static BasePage * FromPayload(void *)
Definition heap-page.h:314
static const GCInfo & GCInfoFromIndex(GCInfoIndex index)
V8_EXPORT_PRIVATE void MarkAsFullyConstructed()
V8_EXPORT_PRIVATE void CheckApiConstants()
V8_EXPORT_PRIVATE HeapObjectName GetName() const
static LargePage * From(BasePage *page)
Definition heap-page.h:275
size_t ObjectSize() const
Definition heap-page.h:292
static void MarkObjectAsFullyConstructed(const void *payload)
Definition allocation.h:51
static constexpr U kMask
Definition bit-field.h:41
static constexpr size_t kFullyConstructedBitFieldOffsetFromPayload
static constexpr uint16_t kFullyConstructedBitMask
constexpr size_t kAllocationGranularity
Definition globals.h:37
FinalizationCallback finalize