#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 {
constexpr double kMaximumLimitRatioForIncrementalGC = …;
constexpr double kMinimumLimitRatioForIncrementalGC = …;
}
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() { … }
constexpr double HeapGrowing::kGrowingFactor;
}
}