![]() |
v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
|
#include <free-list.h>
Public Types | |
enum class | SmallBlocksMode { kAllow , kProhibit } |
Protected Member Functions | |
FreeListCategoryType | SelectFastAllocationFreeListCategoryType (size_t size_in_bytes) |
![]() | |
void | UpdateCacheAfterAddition (FreeListCategoryType cat) |
void | UpdateCacheAfterRemoval (FreeListCategoryType cat) |
![]() | |
FreeListCategoryType | SelectFreeListCategoryType (size_t size_in_bytes) override |
FRIEND_TEST (SpacesTest, FreeListManySelectFreeListCategoryType) | |
FRIEND_TEST (SpacesTest, FreeListManyGuaranteedAllocatable) | |
![]() | |
void | VerifyAvailable () |
Tagged< FreeSpace > | TryFindNodeIn (FreeListCategoryType type, size_t minimum_size, size_t *node_size) |
Tagged< FreeSpace > | SearchForNodeInList (FreeListCategoryType type, size_t minimum_size, size_t *node_size) |
FreeListCategory * | top (FreeListCategoryType type) const |
PageMetadata * | GetPageForCategoryType (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 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 V8_EXPORT_PRIVATE std::unique_ptr< FreeList > | CreateFreeList () |
static V8_EXPORT_PRIVATE std::unique_ptr< FreeList > | CreateFreeListForNewSpace () |
![]() | |
int | next_nonempty_category [kNumberOfCategories+1] |
![]() | |
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_t > | wasted_bytes_ = 0 |
Definition at line 434 of file free-list.h.
|
strong |
Enumerator | |
---|---|
kAllow | |
kProhibit |
Definition at line 437 of file free-list.h.
|
inlineexplicit |
Definition at line 439 of file free-list.h.
|
overridevirtual |
Reimplemented from v8::internal::FreeListManyCached.
Reimplemented in v8::internal::FreeListManyCachedOrigin.
Definition at line 363 of file free-list.cc.
|
private |
|
inlineprotected |
|
staticprotected |
Definition at line 460 of file free-list.h.
|
staticprotected |
Definition at line 455 of file free-list.h.
|
staticprotected |
Definition at line 458 of file free-list.h.
|
staticprotected |
Definition at line 456 of file free-list.h.
|
staticprotected |
Definition at line 457 of file free-list.h.
|
private |
Definition at line 482 of file free-list.h.