#include "src/heap/cppgc/heap-page.h"
#include <algorithm>
#include <cstddef>
#include "include/cppgc/internal/api-constants.h"
#include "src/base/logging.h"
#include "src/base/platform/mutex.h"
#include "src/heap/cppgc/globals.h"
#include "src/heap/cppgc/heap-object-header.h"
#include "src/heap/cppgc/heap-space.h"
#include "src/heap/cppgc/heap.h"
#include "src/heap/cppgc/memory.h"
#include "src/heap/cppgc/object-start-bitmap.h"
#include "src/heap/cppgc/page-memory.h"
#include "src/heap/cppgc/raw-heap.h"
#include "src/heap/cppgc/remembered-set.h"
#include "src/heap/cppgc/stats-collector.h"
namespace cppgc {
namespace internal {
static_assert …;
namespace {
Address AlignAddress(Address address, size_t alignment) { … }
}
HeapBase& BasePage::heap() const { … }
BasePage* BasePage::FromInnerAddress(const HeapBase* heap, void* address) { … }
const BasePage* BasePage::FromInnerAddress(const HeapBase* heap,
const void* address) { … }
void BasePage::Destroy(BasePage* page,
FreeMemoryHandling free_memory_handling) { … }
Address BasePage::PayloadStart() { … }
ConstAddress BasePage::PayloadStart() const { … }
Address BasePage::PayloadEnd() { … }
ConstAddress BasePage::PayloadEnd() const { … }
size_t BasePage::AllocatedSize() const { … }
size_t BasePage::AllocatedBytesAtLastGC() const { … }
HeapObjectHeader* BasePage::TryObjectHeaderFromInnerAddress(
void* address) const { … }
const HeapObjectHeader* BasePage::TryObjectHeaderFromInnerAddress(
const void* address) const { … }
#if defined(CPPGC_YOUNG_GENERATION)
void BasePage::AllocateSlotSet() { … }
void BasePage::SlotSetDeleter::operator()(SlotSet* slot_set) const { … }
void BasePage::ResetSlotSet() { … }
#endif
BasePage::BasePage(HeapBase& heap, BaseSpace& space, PageType type)
: … { … }
void BasePage::ChangeOwner(BaseSpace& space) { … }
NormalPage* NormalPage::TryCreate(PageBackend& page_backend,
NormalPageSpace& space) { … }
void NormalPage::Destroy(NormalPage* page,
FreeMemoryHandling free_memory_handling) { … }
NormalPage::NormalPage(HeapBase& heap, BaseSpace& space)
: … { … }
NormalPage::iterator NormalPage::begin() { … }
NormalPage::const_iterator NormalPage::begin() const { … }
Address NormalPage::PayloadStart() { … }
ConstAddress NormalPage::PayloadStart() const { … }
Address NormalPage::PayloadEnd() { … }
ConstAddress NormalPage::PayloadEnd() const { … }
size_t NormalPage::PayloadSize() { … }
LargePage::LargePage(HeapBase& heap, BaseSpace& space, size_t size)
: … { … }
size_t LargePage::AllocationSize(size_t payload_size) { … }
LargePage* LargePage::TryCreate(PageBackend& page_backend,
LargePageSpace& space, size_t size) { … }
void LargePage::Destroy(LargePage* page) { … }
HeapObjectHeader* LargePage::ObjectHeader() { … }
const HeapObjectHeader* LargePage::ObjectHeader() const { … }
Address LargePage::PayloadStart() { … }
ConstAddress LargePage::PayloadStart() const { … }
Address LargePage::PayloadEnd() { … }
ConstAddress LargePage::PayloadEnd() const { … }
}
}