chromium/v8/src/base/region-allocator.cc

// Copyright 2018 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/base/region-allocator.h"

#include <iterator>

#include "src/base/bits.h"
#include "src/base/logging.h"
#include "src/base/macros.h"

namespace v8 {
namespace base {

// If |free_size| < |region_size| * |kMaxLoadFactorForRandomization| stop trying
// to randomize region allocation.
constexpr double kMaxLoadFactorForRandomization =;

// Max number of attempts to allocate page at random address.
constexpr int kMaxRandomizationAttempts =;

RegionAllocator::RegionAllocator(Address memory_region_begin,
                                 size_t memory_region_size, size_t page_size)
    :{}

RegionAllocator::~RegionAllocator() {}

RegionAllocator::AllRegionsSet::iterator RegionAllocator::FindRegion(
    Address address) {}

void RegionAllocator::FreeListAddRegion(Region* region) {}

RegionAllocator::Region* RegionAllocator::FreeListFindRegion(size_t size) {}

void RegionAllocator::FreeListRemoveRegion(Region* region) {}

RegionAllocator::Region* RegionAllocator::Split(Region* region,
                                                size_t new_size) {}

void RegionAllocator::Merge(AllRegionsSet::iterator prev_iter,
                            AllRegionsSet::iterator next_iter) {}

RegionAllocator::Address RegionAllocator::AllocateRegion(size_t size) {}

RegionAllocator::Address RegionAllocator::AllocateRegion(
    RandomNumberGenerator* rng, size_t size) {}

bool RegionAllocator::AllocateRegionAt(Address requested_address, size_t size,
                                       RegionState region_state) {}

RegionAllocator::Address RegionAllocator::AllocateAlignedRegion(
    size_t size, size_t alignment) {}

RegionAllocator::Address RegionAllocator::AllocateRegion(Address hint,
                                                         size_t size,
                                                         size_t alignment) {}

size_t RegionAllocator::TrimRegion(Address address, size_t new_size) {}

size_t RegionAllocator::CheckRegion(Address address) {}

bool RegionAllocator::IsFree(Address address, size_t size) {}

namespace {
const char* RegionStateToString(RegionAllocator::RegionState state) {}
}  // namespace

void RegionAllocator::Region::Print(std::ostream& os) const {}

void RegionAllocator::Print(std::ostream& os) const {}

}  // namespace base
}  // namespace v8