v8  9.4.146 (node 16.13.0)
V8 is Google's open source JavaScript engine
HeapStatistics Struct Referencefinal

#include <heap-statistics.h>

Data Structures

struct  FreeListStatistics
 
struct  ObjectStatsEntry
 
struct  PageStatistics
 
struct  SpaceStatistics
 

Public Types

enum  DetailLevel : uint8_t { kBrief , kDetailed }
 

Data Fields

size_t committed_size_bytes = 0
 
size_t resident_size_bytes = 0
 
size_t used_size_bytes = 0
 
DetailLevel detail_level
 
std::vector< SpaceStatisticsspace_stats
 
std::vector< std::string > type_names
 

Detailed Description

HeapStatistics contains memory consumption and utilization statistics for a cppgc heap.

Definition at line 19 of file heap-statistics.h.

Member Enumeration Documentation

◆ DetailLevel

enum DetailLevel : uint8_t

Specifies the detail level of the heap statistics. Brief statistics contain only the top-level allocated and used memory statistics for the entire heap. Detailed statistics also contain a break down per space and page, as well as freelist statistics and object type histograms. Note that used memory reported by brief statistics and detailed statistics might differ slightly.

Enumerator
kBrief 
kDetailed 

Definition at line 28 of file heap-statistics.h.

Field Documentation

◆ committed_size_bytes

size_t committed_size_bytes = 0

Overall committed amount of memory for the heap.

Definition at line 100 of file heap-statistics.h.

◆ detail_level

DetailLevel detail_level

Detail level of this HeapStatistics.

Definition at line 106 of file heap-statistics.h.

◆ resident_size_bytes

size_t resident_size_bytes = 0

Resident amount of memory help by the heap.

Definition at line 102 of file heap-statistics.h.

◆ space_stats

std::vector<SpaceStatistics> space_stats

Statistics for each of the spaces in the heap. Filled only when detail_level is DetailLevel::kDetailed.

Definition at line 110 of file heap-statistics.h.

◆ type_names

std::vector<std::string> type_names

Vector of cppgc::GarbageCollected type names.

Definition at line 115 of file heap-statistics.h.

◆ used_size_bytes

size_t used_size_bytes = 0

Amount of memory actually used on the heap.

Definition at line 104 of file heap-statistics.h.


The documentation for this struct was generated from the following file: