#include "src/heap/new-spaces.h"
#include <atomic>
#include <optional>
#include "src/common/globals.h"
#include "src/heap/allocation-observer.h"
#include "src/heap/array-buffer-sweeper.h"
#include "src/heap/concurrent-marking.h"
#include "src/heap/free-list-inl.h"
#include "src/heap/gc-tracer-inl.h"
#include "src/heap/heap-inl.h"
#include "src/heap/heap-verifier.h"
#include "src/heap/incremental-marking.h"
#include "src/heap/mark-compact.h"
#include "src/heap/marking-state-inl.h"
#include "src/heap/marking-state.h"
#include "src/heap/memory-allocator.h"
#include "src/heap/memory-chunk.h"
#include "src/heap/page-metadata-inl.h"
#include "src/heap/paged-spaces.h"
#include "src/heap/safepoint.h"
#include "src/heap/spaces-inl.h"
#include "src/heap/spaces.h"
#include "src/heap/zapping.h"
namespace v8 {
namespace internal {
PageMetadata* SemiSpace::InitializePage(MutablePageMetadata* mutable_page) { … }
bool SemiSpace::EnsureCurrentCapacity() { … }
void SemiSpace::SetUp(size_t initial_capacity, size_t maximum_capacity) { … }
void SemiSpace::TearDown() { … }
bool SemiSpace::Commit() { … }
void SemiSpace::Uncommit() { … }
size_t SemiSpace::CommittedPhysicalMemory() const { … }
bool SemiSpace::GrowTo(size_t new_capacity) { … }
void SemiSpace::RewindPages(int num_pages) { … }
void SemiSpace::ShrinkTo(size_t new_capacity) { … }
void SemiSpace::FixPagesFlags() { … }
void SemiSpace::Reset() { … }
void SemiSpace::RemovePage(PageMetadata* page) { … }
void SemiSpace::PrependPage(PageMetadata* page) { … }
void SemiSpace::MovePageToTheEnd(PageMetadata* page) { … }
void SemiSpace::Swap(SemiSpace* from, SemiSpace* to) { … }
void SemiSpace::IncrementCommittedPhysicalMemory(size_t increment_value) { … }
void SemiSpace::DecrementCommittedPhysicalMemory(size_t decrement_value) { … }
void SemiSpace::AddRangeToActiveSystemPages(Address start, Address end) { … }
void SemiSpace::set_age_mark(Address mark) { … }
std::unique_ptr<ObjectIterator> SemiSpace::GetObjectIterator(Heap* heap) { … }
#ifdef DEBUG
void SemiSpace::Print() { … }
#endif
#ifdef VERIFY_HEAP
void SemiSpace::VerifyPageMetadata() const { … }
#endif
#ifdef DEBUG
void SemiSpace::AssertValidRange(Address start, Address end) { … }
#endif
NewSpace::NewSpace(Heap* heap)
: … { … }
void NewSpace::PromotePageToOldSpace(PageMetadata* page) { … }
SemiSpaceNewSpace::SemiSpaceNewSpace(Heap* heap,
size_t initial_semispace_capacity,
size_t max_semispace_capacity)
: … { … }
SemiSpaceNewSpace::~SemiSpaceNewSpace() { … }
void SemiSpaceNewSpace::Grow() { … }
void SemiSpaceNewSpace::set_age_mark_to_top() { … }
void SemiSpaceNewSpace::Shrink() { … }
size_t SemiSpaceNewSpace::CommittedPhysicalMemory() const { … }
bool SemiSpaceNewSpace::EnsureCurrentCapacity() { … }
void SemiSpaceNewSpace::ResetCurrentSpace() { … }
bool SemiSpaceNewSpace::AddFreshPage() { … }
bool SemiSpaceNewSpace::AddParkedAllocationBuffer(
int size_in_bytes, AllocationAlignment alignment) { … }
void SemiSpaceNewSpace::ResetParkedAllocationBuffers() { … }
int SemiSpaceNewSpace::GetSpaceRemainingOnCurrentPageForTesting() { … }
void SemiSpaceNewSpace::FillCurrentPageForTesting() { … }
#ifdef VERIFY_HEAP
void SemiSpaceNewSpace::Verify(Isolate* isolate,
SpaceVerificationVisitor* visitor) const { … }
void SemiSpaceNewSpace::VerifyObjects(Isolate* isolate,
SpaceVerificationVisitor* visitor) const { … }
#endif
void SemiSpaceNewSpace::MakeIterable() { … }
void SemiSpaceNewSpace::MakeAllPagesInFromSpaceIterable() { … }
void SemiSpaceNewSpace::MakeUnusedPagesInToSpaceIterable() { … }
bool SemiSpaceNewSpace::ShouldBePromoted(Address address) const { … }
std::unique_ptr<ObjectIterator> SemiSpaceNewSpace::GetObjectIterator(
Heap* heap) { … }
bool SemiSpaceNewSpace::ContainsSlow(Address a) const { … }
size_t SemiSpaceNewSpace::Size() const { … }
size_t SemiSpaceNewSpace::AllocatedSinceLastGC() const { … }
void SemiSpaceNewSpace::GarbageCollectionPrologue() { … }
void SemiSpaceNewSpace::EvacuatePrologue() { … }
void SemiSpaceNewSpace::GarbageCollectionEpilogue() { … }
void SemiSpaceNewSpace::ZapUnusedMemory() { … }
void SemiSpaceNewSpace::RemovePage(PageMetadata* page) { … }
bool SemiSpaceNewSpace::IsPromotionCandidate(
const MutablePageMetadata* page) const { … }
std::optional<std::pair<Address, Address>> SemiSpaceNewSpace::Allocate(
int size_in_bytes, AllocationAlignment alignment) { … }
void SemiSpaceNewSpace::Free(Address start, Address end) { … }
AllocatorPolicy* SemiSpaceNewSpace::CreateAllocatorPolicy(
MainAllocator* allocator) { … }
PagedSpaceForNewSpace::PagedSpaceForNewSpace(Heap* heap,
size_t initial_capacity,
size_t max_capacity)
: … { … }
PageMetadata* PagedSpaceForNewSpace::InitializePage(
MutablePageMetadata* mutable_page_metadata) { … }
void PagedSpaceForNewSpace::Grow() { … }
bool PagedSpaceForNewSpace::StartShrinking() { … }
void PagedSpaceForNewSpace::FinishShrinking() { … }
size_t PagedSpaceForNewSpace::AddPage(PageMetadata* page) { … }
void PagedSpaceForNewSpace::RemovePage(PageMetadata* page) { … }
void PagedSpaceForNewSpace::ReleasePage(PageMetadata* page) { … }
bool PagedSpaceForNewSpace::ShouldReleaseEmptyPage() const { … }
void PagedSpaceForNewSpace::AllocatePageUpToCapacityForTesting() { … }
bool PagedSpaceForNewSpace::AllocatePage() { … }
bool PagedSpaceForNewSpace::IsPromotionCandidate(
const MutablePageMetadata* page) const { … }
size_t PagedSpaceForNewSpace::AllocatedSinceLastGC() const { … }
size_t PagedSpaceForNewSpace::Available() const { … }
#ifdef VERIFY_HEAP
void PagedSpaceForNewSpace::Verify(Isolate* isolate,
SpaceVerificationVisitor* visitor) const { … }
#endif
PagedNewSpace::PagedNewSpace(Heap* heap, size_t initial_capacity,
size_t max_capacity)
: … { … }
PagedNewSpace::~PagedNewSpace() { … }
AllocatorPolicy* PagedNewSpace::CreateAllocatorPolicy(
MainAllocator* allocator) { … }
}
}