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

#include "src/base/macros.h"
#include "src/common/globals.h"
#include "src/heap/free-list-inl.h"
#include "src/heap/heap.h"
#include "src/heap/mutable-page-metadata-inl.h"
#include "src/heap/page-metadata-inl.h"
#include "src/objects/free-space-inl.h"

namespace v8 {
namespace internal {

// -----------------------------------------------------------------------------
// Free lists for old object spaces implementation

void FreeListCategory::Reset(FreeList* owner) {}

Tagged<FreeSpace> FreeListCategory::PickNodeFromList(size_t minimum_size,
                                                     size_t* node_size) {}

Tagged<FreeSpace> FreeListCategory::SearchForNodeInList(size_t minimum_size,
                                                        size_t* node_size) {}

void FreeListCategory::Free(const WritableFreeSpace& writable_free_space,
                            FreeMode mode, FreeList* owner) {}

void FreeListCategory::RepairFreeList(Heap* heap) {}

void FreeListCategory::Relink(FreeList* owner) {}

// ------------------------------------------------
// Generic FreeList methods (alloc/free related)

FreeList::FreeList(int number_of_categories, size_t min_block_size)
    :{}

std::unique_ptr<FreeList> FreeList::CreateFreeList() {}

std::unique_ptr<FreeList> FreeList::CreateFreeListForNewSpace() {}

Tagged<FreeSpace> FreeList::TryFindNodeIn(FreeListCategoryType type,
                                          size_t minimum_size,
                                          size_t* node_size) {}

Tagged<FreeSpace> FreeList::SearchForNodeInList(FreeListCategoryType type,
                                                size_t minimum_size,
                                                size_t* node_size) {}

size_t FreeList::Free(const WritableFreeSpace& free_space, FreeMode mode) {}

// ------------------------------------------------
// FreeListMany implementation

constexpr unsigned int FreeListMany::categories_min[kNumberOfCategories];

FreeListMany::FreeListMany() :{}

FreeListMany::~FreeListMany() {}

PageMetadata* FreeListMany::GetPageForSize(size_t size_in_bytes) {}

Tagged<FreeSpace> FreeListMany::Allocate(size_t size_in_bytes,
                                         size_t* node_size,
                                         AllocationOrigin origin) {}

// ------------------------------------------------
// FreeListManyCached implementation

FreeListManyCached::FreeListManyCached() {}

void FreeListManyCached::Reset() {}

bool FreeListManyCached::AddCategory(FreeListCategory* category) {}

void FreeListManyCached::RemoveCategory(FreeListCategory* category) {}

size_t FreeListManyCached::Free(const WritableFreeSpace& free_space,
                                FreeMode mode) {}

Tagged<FreeSpace> FreeListManyCached::Allocate(size_t size_in_bytes,
                                               size_t* node_size,
                                               AllocationOrigin origin) {}

// ------------------------------------------------
// FreeListManyCachedFastPathBase implementation

Tagged<FreeSpace> FreeListManyCachedFastPathBase::Allocate(
    size_t size_in_bytes, size_t* node_size, AllocationOrigin origin) {}

// ------------------------------------------------
// FreeListManyCachedOrigin implementation

Tagged<FreeSpace> FreeListManyCachedOrigin::Allocate(size_t size_in_bytes,
                                                     size_t* node_size,
                                                     AllocationOrigin origin) {}

// ------------------------------------------------
// Generic FreeList methods (non alloc/free related)

void FreeList::Reset() {}

size_t FreeList::EvictFreeListItems(PageMetadata* page) {}

void FreeList::RepairLists(Heap* heap) {}

bool FreeList::AddCategory(FreeListCategory* category) {}

void FreeList::RemoveCategory(FreeListCategory* category) {}

void FreeList::PrintCategories(FreeListCategoryType type) {}

size_t FreeListCategory::SumFreeList() {}
int FreeListCategory::FreeListLength() {}

#ifdef DEBUG
bool FreeList::IsVeryLong() {}

// This can take a very long time because it is linear in the number of entries
// on the free list, so it should not be called if FreeListLength returns
// kVeryLongFreeList.
size_t FreeList::SumFreeLists() {}
#endif

}  // namespace internal
}  // namespace v8