v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
object-size-trait.cc
Go to the documentation of this file.
1// Copyright 2021 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
10
11namespace cppgc {
12namespace internal {
13
14// static
20
21// static
23 const void* address) {
24 // `address` is guaranteed to be on a normal page because large object mixins
25 // are not supported.
26 const auto& header =
29 DCHECK(!header.IsLargeObject<AccessMode::kAtomic>());
30 return header.ObjectSize<AccessMode::kAtomic>();
31}
32
33} // namespace internal
34} // namespace cppgc
HeapObjectHeader & ObjectHeaderFromInnerAddress(void *address) const
Definition heap-page.h:339
static BasePage * FromPayload(void *)
Definition heap-page.h:314
static HeapObjectHeader & FromObject(void *address)
V8_INLINE size_t Size() const
Definition object-view.h:54
#define DCHECK(condition)
Definition logging.h:482
static size_t GetObjectSizeForGarbageCollectedMixin(const void *)
static size_t GetObjectSizeForGarbageCollected(const void *)