v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::FreeListMany Class Reference

#include <free-list.h>

Inheritance diagram for v8::internal::FreeListMany:
Collaboration diagram for v8::internal::FreeListMany:

Public Member Functions

PageMetadataGetPageForSize (size_t size_in_bytes) override
 
 FreeListMany ()
 
 ~FreeListMany () override
 
V8_WARN_UNUSED_RESULT Tagged< FreeSpaceAllocate (size_t size_in_bytes, size_t *node_size, AllocationOrigin origin) override
 
- Public Member Functions inherited from v8::internal::FreeList
 FreeList (int number_of_categories, size_t min_block_size)
 
virtual ~FreeList ()=default
 
virtual size_t Free (const WritableFreeSpace &free_space, FreeMode mode)
 
virtual void Reset ()
 
virtual void ResetForNonBlackAllocatedPages ()
 
size_t Available ()
 
void IncreaseAvailableBytes (size_t bytes)
 
void DecreaseAvailableBytes (size_t bytes)
 
size_t wasted_bytes () const
 
void increase_wasted_bytes (size_t bytes)
 
void decrease_wasted_bytes (size_t bytes)
 
bool IsEmpty ()
 
void RepairLists (Heap *heap)
 
V8_EXPORT_PRIVATE void EvictFreeListItems (PageMetadata *page)
 
int number_of_categories ()
 
FreeListCategoryType last_category ()
 
size_t min_block_size () const
 
template<typename Callback >
void ForAllFreeListCategories (FreeListCategoryType type, Callback callback)
 
template<typename Callback >
void ForAllFreeListCategories (Callback callback)
 
virtual bool AddCategory (FreeListCategory *category)
 
virtual V8_EXPORT_PRIVATE void RemoveCategory (FreeListCategory *category)
 
void PrintCategories (FreeListCategoryType type)
 

Protected Member Functions

FreeListCategoryType SelectFreeListCategoryType (size_t size_in_bytes) override
 
 FRIEND_TEST (SpacesTest, FreeListManySelectFreeListCategoryType)
 
 FRIEND_TEST (SpacesTest, FreeListManyGuaranteedAllocatable)
 
- Protected Member Functions inherited from v8::internal::FreeList
void VerifyAvailable ()
 
Tagged< FreeSpaceTryFindNodeIn (FreeListCategoryType type, size_t minimum_size, size_t *node_size)
 
Tagged< FreeSpaceSearchForNodeInList (FreeListCategoryType type, size_t minimum_size, size_t *node_size)
 
FreeListCategorytop (FreeListCategoryType type) const
 
PageMetadataGetPageForCategoryType (FreeListCategoryType type)
 

Static Protected Attributes

static constexpr size_t kMinBlockSize = 3 * kTaggedSize
 
static constexpr size_t kMaxBlockSize = MutablePageMetadata::kPageSize
 
static constexpr size_t kPreciseCategoryMaxSize = 256
 
static constexpr int kNumberOfCategories = 24
 
static constexpr unsigned int categories_min [kNumberOfCategories]
 

Additional Inherited Members

- Static Public Member Functions inherited from v8::internal::FreeList
static V8_EXPORT_PRIVATE std::unique_ptr< FreeListCreateFreeList ()
 
static V8_EXPORT_PRIVATE std::unique_ptr< FreeListCreateFreeListForNewSpace ()
 
- Protected Attributes inherited from v8::internal::FreeList
const int number_of_categories_ = 0
 
const FreeListCategoryType last_category_ = 0
 
size_t min_block_size_ = 0
 
FreeListCategory ** categories_ = nullptr
 
size_t available_ = 0
 
std::atomic< size_twasted_bytes_ = 0
 

Detailed Description

Definition at line 295 of file free-list.h.

Constructor & Destructor Documentation

◆ FreeListMany()

v8::internal::FreeListMany::FreeListMany ( )

Definition at line 201 of file free-list.cc.

Here is the call graph for this function:

◆ ~FreeListMany()

v8::internal::FreeListMany::~FreeListMany ( )
override

Definition at line 207 of file free-list.cc.

Member Function Documentation

◆ Allocate()

Tagged< FreeSpace > v8::internal::FreeListMany::Allocate ( size_t size_in_bytes,
size_t * node_size,
AllocationOrigin origin )
overridevirtual

Implements v8::internal::FreeList.

Reimplemented in v8::internal::FreeListManyCached, v8::internal::FreeListManyCachedFastPathBase, and v8::internal::FreeListManyCachedOrigin.

Definition at line 223 of file free-list.cc.

Here is the call graph for this function:

◆ FRIEND_TEST() [1/2]

v8::internal::FreeListMany::FRIEND_TEST ( SpacesTest ,
FreeListManyGuaranteedAllocatable  )
protected

◆ FRIEND_TEST() [2/2]

v8::internal::FreeListMany::FRIEND_TEST ( SpacesTest ,
FreeListManySelectFreeListCategoryType  )
protected

◆ GetPageForSize()

PageMetadata * v8::internal::FreeListMany::GetPageForSize ( size_t size_in_bytes)
overridevirtual

Implements v8::internal::FreeList.

Definition at line 209 of file free-list.cc.

Here is the call graph for this function:

◆ SelectFreeListCategoryType()

FreeListCategoryType v8::internal::FreeListMany::SelectFreeListCategoryType ( size_t size_in_bytes)
inlineoverrideprotectedvirtual

Implements v8::internal::FreeList.

Definition at line 330 of file free-list.h.

Here is the caller graph for this function:

Member Data Documentation

◆ categories_min

unsigned int v8::internal::FreeListMany::categories_min
staticconstexprprotected
Initial value:
= {
24, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192,
208, 224, 240, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536}

Definition at line 325 of file free-list.h.

◆ kMaxBlockSize

size_t v8::internal::FreeListMany::kMaxBlockSize = MutablePageMetadata::kPageSize
staticconstexprprotected

Definition at line 311 of file free-list.h.

◆ kMinBlockSize

size_t v8::internal::FreeListMany::kMinBlockSize = 3 * kTaggedSize
staticconstexprprotected

Definition at line 307 of file free-list.h.

◆ kNumberOfCategories

int v8::internal::FreeListMany::kNumberOfCategories = 24
staticconstexprprotected

Definition at line 324 of file free-list.h.

◆ kPreciseCategoryMaxSize

size_t v8::internal::FreeListMany::kPreciseCategoryMaxSize = 256
staticconstexprprotected

Definition at line 314 of file free-list.h.


The documentation for this class was generated from the following files: