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

#include <cmath>
#include <memory>

#include "include/cppgc/platform.h"
#include "src/base/macros.h"
#include "src/heap/base/incremental-marking-schedule.h"
#include "src/heap/cppgc/globals.h"
#include "src/heap/cppgc/heap.h"
#include "src/heap/cppgc/stats-collector.h"
#include "src/heap/cppgc/task-handle.h"

namespace cppgc {
namespace internal {

namespace {
// Minimum ratio between limit for incremental GC and limit for atomic GC
// (to guarantee that limits are not to close to each other).
constexpr double kMaximumLimitRatioForIncrementalGC =;
// Minimum ratio between limit for incremental GC and limit for atomic GC
// (to guarantee that limit is not too close to current allocated size).
constexpr double kMinimumLimitRatioForIncrementalGC =;
}  // namespace

class HeapGrowing::HeapGrowingImpl final
    : public StatsCollector::AllocationObserver {};

HeapGrowing::HeapGrowingImpl::HeapGrowingImpl(
    GarbageCollector* collector, StatsCollector* stats_collector,
    cppgc::Heap::ResourceConstraints constraints,
    cppgc::Heap::MarkingType marking_support,
    cppgc::Heap::SweepingType sweeping_support)
    :{}

HeapGrowing::HeapGrowingImpl::~HeapGrowingImpl() {}

void HeapGrowing::HeapGrowingImpl::AllocatedObjectSizeIncreased(size_t) {}

void HeapGrowing::HeapGrowingImpl::ResetAllocatedObjectSize(
    size_t allocated_object_size) {}

void HeapGrowing::HeapGrowingImpl::ConfigureLimit(
    size_t allocated_object_size) {}

void HeapGrowing::HeapGrowingImpl::DisableForTesting() {}

HeapGrowing::HeapGrowing(GarbageCollector* collector,
                         StatsCollector* stats_collector,
                         cppgc::Heap::ResourceConstraints constraints,
                         cppgc::Heap::MarkingType marking_support,
                         cppgc::Heap::SweepingType sweeping_support)
    :{}

HeapGrowing::~HeapGrowing() = default;

size_t HeapGrowing::limit_for_atomic_gc() const {}
size_t HeapGrowing::limit_for_incremental_gc() const {}

void HeapGrowing::DisableForTesting() {}

// static
constexpr double HeapGrowing::kGrowingFactor;

}  // namespace internal
}  // namespace cppgc