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

#include "src/base/logging.h"
#include "src/common/globals.h"
#include "src/execution/isolate.h"
#include "src/heap/heap-allocator-inl.h"
#include "src/heap/heap-inl.h"
#include "src/logging/counters.h"

namespace v8 {
namespace internal {

class Heap;

HeapAllocator::HeapAllocator(LocalHeap* local_heap)
    :{}

void HeapAllocator::Setup(LinearAllocationArea* new_allocation_info,
                          LinearAllocationArea* old_allocation_info) {}

void HeapAllocator::SetReadOnlySpace(ReadOnlySpace* read_only_space) {}

AllocationResult HeapAllocator::AllocateRawLargeInternal(
    int size_in_bytes, AllocationType allocation, AllocationOrigin origin,
    AllocationAlignment alignment) {}

namespace {

constexpr AllocationSpace AllocationTypeToGCSpace(AllocationType type) {}

}  // namespace

AllocationResult HeapAllocator::AllocateRawWithLightRetrySlowPath(
    int size, AllocationType allocation, AllocationOrigin origin,
    AllocationAlignment alignment) {}

void HeapAllocator::CollectGarbage(AllocationType allocation) {}

AllocationResult HeapAllocator::AllocateRawWithRetryOrFailSlowPath(
    int size, AllocationType allocation, AllocationOrigin origin,
    AllocationAlignment alignment) {}

void HeapAllocator::CollectAllAvailableGarbage(AllocationType allocation) {}

AllocationResult HeapAllocator::RetryAllocateRaw(
    int size_in_bytes, AllocationType allocation, AllocationOrigin origin,
    AllocationAlignment alignment) {}

void HeapAllocator::MakeLinearAllocationAreasIterable() {}

#if DEBUG
void HeapAllocator::VerifyLinearAllocationAreas() const {}
#endif  // DEBUG

void HeapAllocator::MarkLinearAllocationAreasBlack() {}

void HeapAllocator::UnmarkLinearAllocationsArea() {}

void HeapAllocator::MarkSharedLinearAllocationAreasBlack() {}

void HeapAllocator::UnmarkSharedLinearAllocationAreas() {}

void HeapAllocator::FreeLinearAllocationAreas() {}

void HeapAllocator::PublishPendingAllocations() {}

void HeapAllocator::AddAllocationObserver(
    AllocationObserver* observer, AllocationObserver* new_space_observer) {}

void HeapAllocator::RemoveAllocationObserver(
    AllocationObserver* observer, AllocationObserver* new_space_observer) {}

void HeapAllocator::PauseAllocationObservers() {}

void HeapAllocator::ResumeAllocationObservers() {}

#ifdef DEBUG

void HeapAllocator::IncrementObjectCounters() {}

#endif  // DEBUG

#ifdef V8_ENABLE_ALLOCATION_TIMEOUT
// static
void HeapAllocator::InitializeOncePerProcess() {}

// static
void HeapAllocator::SetAllocationGcInterval(int allocation_gc_interval) {}

// static
std::atomic<int> HeapAllocator::allocation_gc_interval_{};

void HeapAllocator::SetAllocationTimeout(int allocation_timeout) {}

void HeapAllocator::UpdateAllocationTimeout() {}

bool HeapAllocator::ReachedAllocationTimeout() {}

#endif  // V8_ENABLE_ALLOCATION_TIMEOUT

}  // namespace internal
}  // namespace v8