chromium/v8/src/heap/cppgc/gc-info-table.cc

// Copyright 2020 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "src/heap/cppgc/gc-info-table.h"

#include <algorithm>
#include <limits>
#include <memory>

#include "include/cppgc/internal/gc-info.h"
#include "include/cppgc/platform.h"
#include "src/base/bits.h"
#include "src/base/lazy-instance.h"
#include "src/base/page-allocator.h"
#include "src/heap/cppgc/platform.h"

namespace cppgc {
namespace internal {

namespace {

// GCInfoTable::table_, the table which holds GCInfos, is maintained as a
// contiguous array reserved upfront. Subparts of the array are (re-)committed
// as read/write or read-only in OS pages, whose size is a power of 2. To avoid
// having GCInfos that cross the boundaries between these subparts we force the
// size of GCInfo to be a power of 2 as well.
constexpr size_t kEntrySize =;
static_assert;

}  // namespace

GCInfoTable* GlobalGCInfoTable::global_table_ =;

constexpr GCInfoIndex GCInfoTable::kMaxIndex;
constexpr GCInfoIndex GCInfoTable::kMinIndex;
constexpr GCInfoIndex GCInfoTable::kInitialWantedLimit;

// static
void GlobalGCInfoTable::Initialize(PageAllocator& page_allocator) {}

GCInfoTable::GCInfoTable(PageAllocator& page_allocator,
                         FatalOutOfMemoryHandler& oom_handler)
    :{}

GCInfoTable::~GCInfoTable() {}

size_t GCInfoTable::MaxTableSize() const {}

GCInfoIndex GCInfoTable::InitialTableLimit() const {}

void GCInfoTable::Resize() {}

void GCInfoTable::CheckMemoryIsZeroed(uintptr_t* base, size_t len) {}

GCInfoIndex GCInfoTable::RegisterNewGCInfo(
    std::atomic<GCInfoIndex>& registered_index, const GCInfo& info) {}

}  // namespace internal
}  // namespace cppgc