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

#include <free-list.h>

Inheritance diagram for v8::internal::FreeListManyCached:
Collaboration diagram for v8::internal::FreeListManyCached:

Public Member Functions

 FreeListManyCached ()
 
V8_WARN_UNUSED_RESULT Tagged< FreeSpaceAllocate (size_t size_in_bytes, size_t *node_size, AllocationOrigin origin) override
 
size_t Free (const WritableFreeSpace &free_space, FreeMode mode) override
 
void Reset () override
 
void ResetForNonBlackAllocatedPages () override
 
bool AddCategory (FreeListCategory *category) override
 
void RemoveCategory (FreeListCategory *category) override
 
- Public Member Functions inherited from v8::internal::FreeListMany
PageMetadataGetPageForSize (size_t size_in_bytes) override
 
 FreeListMany ()
 
 ~FreeListMany () override
 
- Public Member Functions inherited from v8::internal::FreeList
 FreeList (int number_of_categories, size_t min_block_size)
 
virtual ~FreeList ()=default
 
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)
 
void PrintCategories (FreeListCategoryType type)
 

Protected Member Functions

void UpdateCacheAfterAddition (FreeListCategoryType cat)
 
void UpdateCacheAfterRemoval (FreeListCategoryType cat)
 
- Protected Member Functions inherited from v8::internal::FreeListMany
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)
 

Protected Attributes

int next_nonempty_category [kNumberOfCategories+1]
 
- 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
 

Private Member Functions

void ResetCache ()
 

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 ()
 
- Static Protected Attributes inherited from v8::internal::FreeListMany
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]
 

Detailed Description

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

Constructor & Destructor Documentation

◆ FreeListManyCached()

v8::internal::FreeListManyCached::FreeListManyCached ( )

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

Here is the call graph for this function:

Member Function Documentation

◆ AddCategory()

bool v8::internal::FreeListManyCached::AddCategory ( FreeListCategory * category)
overridevirtual

Reimplemented from v8::internal::FreeList.

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

Here is the call graph for this function:

◆ Allocate()

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

Reimplemented from v8::internal::FreeListMany.

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

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Free()

size_t v8::internal::FreeListManyCached::Free ( const WritableFreeSpace & free_space,
FreeMode mode )
overridevirtual

Reimplemented from v8::internal::FreeList.

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

Here is the call graph for this function:

◆ RemoveCategory()

void v8::internal::FreeListManyCached::RemoveCategory ( FreeListCategory * category)
overridevirtual

Reimplemented from v8::internal::FreeList.

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

Here is the call graph for this function:

◆ Reset()

void v8::internal::FreeListManyCached::Reset ( )
overridevirtual

Reimplemented from v8::internal::FreeList.

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

Here is the call graph for this function:

◆ ResetCache()

void v8::internal::FreeListManyCached::ResetCache ( )
inlineprivate

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

Here is the caller graph for this function:

◆ ResetForNonBlackAllocatedPages()

void v8::internal::FreeListManyCached::ResetForNonBlackAllocatedPages ( )
overridevirtual

Reimplemented from v8::internal::FreeList.

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

Here is the call graph for this function:

◆ UpdateCacheAfterAddition()

void v8::internal::FreeListManyCached::UpdateCacheAfterAddition ( FreeListCategoryType cat)
inlineprotected

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

Here is the caller graph for this function:

◆ UpdateCacheAfterRemoval()

void v8::internal::FreeListManyCached::UpdateCacheAfterRemoval ( FreeListCategoryType cat)
inlineprotected

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

Here is the caller graph for this function:

Member Data Documentation

◆ next_nonempty_category

int v8::internal::FreeListManyCached::next_nonempty_category[kNumberOfCategories+1]
protected

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


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