chromium/v8/src/heap/cppgc/page-memory.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/page-memory.h"

#include <algorithm>
#include <cstddef>
#include <optional>

#include "src/base/macros.h"
#include "src/base/sanitizer/asan.h"
#include "src/heap/cppgc/memory.h"
#include "src/heap/cppgc/platform.h"

namespace cppgc {
namespace internal {

namespace {

V8_WARN_UNUSED_RESULT bool TryUnprotect(PageAllocator& allocator,
                                        const PageMemory& page_memory) {}

V8_WARN_UNUSED_RESULT bool TryDiscard(PageAllocator& allocator,
                                      const PageMemory& page_memory) {}

std::optional<MemoryRegion> ReserveMemoryRegion(PageAllocator& allocator,
                                                size_t allocation_size) {}

void FreeMemoryRegion(PageAllocator& allocator,
                      const MemoryRegion& reserved_region) {}

std::unique_ptr<PageMemoryRegion> CreateNormalPageMemoryRegion(
    PageAllocator& allocator) {}

std::unique_ptr<PageMemoryRegion> CreateLargePageMemoryRegion(
    PageAllocator& allocator, size_t length) {}

}  // namespace

PageMemoryRegion::PageMemoryRegion(PageAllocator& allocator,
                                   MemoryRegion reserved_region)
    :{}

PageMemoryRegion::~PageMemoryRegion() {}

void PageMemoryRegion::UnprotectForTesting() {}

PageMemoryRegionTree::PageMemoryRegionTree() = default;

PageMemoryRegionTree::~PageMemoryRegionTree() = default;

void PageMemoryRegionTree::Add(PageMemoryRegion* region) {}

void PageMemoryRegionTree::Remove(PageMemoryRegion* region) {}

void NormalPageMemoryPool::Add(PageMemoryRegion* pmr) {}

PageMemoryRegion* NormalPageMemoryPool::Take() {}

size_t NormalPageMemoryPool::PooledMemory() const {}

void NormalPageMemoryPool::DiscardPooledPages(PageAllocator& page_allocator) {}

PageBackend::PageBackend(PageAllocator& normal_page_allocator,
                         PageAllocator& large_page_allocator)
    :{}

PageBackend::~PageBackend() = default;

Address PageBackend::TryAllocateNormalPageMemory() {}

void PageBackend::FreeNormalPageMemory(
    Address writeable_base, FreeMemoryHandling free_memory_handling) {}

Address PageBackend::TryAllocateLargePageMemory(size_t size) {}

void PageBackend::FreeLargePageMemory(Address writeable_base) {}

void PageBackend::DiscardPooledPages() {}

}  // namespace internal
}  // namespace cppgc