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

#include <free-list.h>

Inheritance diagram for v8::internal::FreeListManyCachedFastPathBase:
Collaboration diagram for v8::internal::FreeListManyCachedFastPathBase:

Public Types

enum class  SmallBlocksMode { kAllow , kProhibit }
 

Public Member Functions

 FreeListManyCachedFastPathBase (SmallBlocksMode small_blocks_mode)
 
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::FreeListManyCached
 FreeListManyCached ()
 
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

FreeListCategoryType SelectFastAllocationFreeListCategoryType (size_t size_in_bytes)
 
- Protected Member Functions inherited from v8::internal::FreeListManyCached
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)
 

Static Protected Attributes

static const FreeListCategoryType kFastPathFirstCategory = 18
 
static const size_t kFastPathStart = 2048
 
static const size_t kTinyObjectMaxSize = 128
 
static const size_t kFastPathOffset = kFastPathStart - kTinyObjectMaxSize
 
static const FreeListCategoryType kFastPathFallBackTiny = 15
 
- 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]
 

Private Member Functions

 FRIEND_TEST (SpacesTest, FreeListManyCachedFastPathSelectFastAllocationFreeListCategoryType)
 

Private Attributes

SmallBlocksMode small_blocks_mode_
 

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::FreeListManyCached
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
 

Detailed Description

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

Member Enumeration Documentation

◆ SmallBlocksMode

Enumerator
kAllow 
kProhibit 

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

Constructor & Destructor Documentation

◆ FreeListManyCachedFastPathBase()

v8::internal::FreeListManyCachedFastPathBase::FreeListManyCachedFastPathBase ( SmallBlocksMode small_blocks_mode)
inlineexplicit

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

Member Function Documentation

◆ Allocate()

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

Reimplemented from v8::internal::FreeListManyCached.

Reimplemented in v8::internal::FreeListManyCachedOrigin.

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

Here is the call graph for this function:

◆ FRIEND_TEST()

v8::internal::FreeListManyCachedFastPathBase::FRIEND_TEST ( SpacesTest ,
FreeListManyCachedFastPathSelectFastAllocationFreeListCategoryType  )
private

◆ SelectFastAllocationFreeListCategoryType()

FreeListCategoryType v8::internal::FreeListManyCachedFastPathBase::SelectFastAllocationFreeListCategoryType ( size_t size_in_bytes)
inlineprotected

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

Here is the caller graph for this function:

Member Data Documentation

◆ kFastPathFallBackTiny

const FreeListCategoryType v8::internal::FreeListManyCachedFastPathBase::kFastPathFallBackTiny = 15
staticprotected

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

◆ kFastPathFirstCategory

const FreeListCategoryType v8::internal::FreeListManyCachedFastPathBase::kFastPathFirstCategory = 18
staticprotected

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

◆ kFastPathOffset

const size_t v8::internal::FreeListManyCachedFastPathBase::kFastPathOffset = kFastPathStart - kTinyObjectMaxSize
staticprotected

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

◆ kFastPathStart

const size_t v8::internal::FreeListManyCachedFastPathBase::kFastPathStart = 2048
staticprotected

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

◆ kTinyObjectMaxSize

const size_t v8::internal::FreeListManyCachedFastPathBase::kTinyObjectMaxSize = 128
staticprotected

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

◆ small_blocks_mode_

SmallBlocksMode v8::internal::FreeListManyCachedFastPathBase::small_blocks_mode_
private

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


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