#[repr(u32)]
pub enum JSGCParamKey {
Show 46 variants JSGC_MAX_BYTES, JSGC_MAX_NURSERY_BYTES, JSGC_BYTES, JSGC_NUMBER, JSGC_INCREMENTAL_GC_ENABLED, JSGC_PER_ZONE_GC_ENABLED, JSGC_UNUSED_CHUNKS, JSGC_TOTAL_CHUNKS, JSGC_SLICE_TIME_BUDGET_MS, JSGC_HIGH_FREQUENCY_TIME_LIMIT, JSGC_SMALL_HEAP_SIZE_MAX, JSGC_LARGE_HEAP_SIZE_MIN, JSGC_HIGH_FREQUENCY_SMALL_HEAP_GROWTH, JSGC_HIGH_FREQUENCY_LARGE_HEAP_GROWTH, JSGC_LOW_FREQUENCY_HEAP_GROWTH, JSGC_BALANCED_HEAP_LIMITS_ENABLED, JSGC_HEAP_GROWTH_FACTOR, JSGC_ALLOCATION_THRESHOLD, JSGC_MIN_EMPTY_CHUNK_COUNT, JSGC_MAX_EMPTY_CHUNK_COUNT, JSGC_COMPACTING_ENABLED, JSGC_PARALLEL_MARKING_ENABLED, JSGC_SMALL_HEAP_INCREMENTAL_LIMIT, JSGC_LARGE_HEAP_INCREMENTAL_LIMIT, JSGC_NURSERY_FREE_THRESHOLD_FOR_IDLE_COLLECTION, JSGC_PRETENURE_THRESHOLD, JSGC_NURSERY_FREE_THRESHOLD_FOR_IDLE_COLLECTION_PERCENT, JSGC_MIN_NURSERY_BYTES, JSGC_MIN_LAST_DITCH_GC_PERIOD, JSGC_ZONE_ALLOC_DELAY_KB, JSGC_NURSERY_BYTES, JSGC_MALLOC_THRESHOLD_BASE, JSGC_INCREMENTAL_WEAKMAP_ENABLED, JSGC_CHUNK_BYTES, JSGC_HELPER_THREAD_RATIO, JSGC_MAX_HELPER_THREADS, JSGC_HELPER_THREAD_COUNT, JSGC_PRETENURE_STRING_THRESHOLD, JSGC_STOP_PRETENURE_STRING_THRESHOLD, JSGC_MAJOR_GC_NUMBER, JSGC_MINOR_GC_NUMBER, JSGC_NURSERY_TIMEOUT_FOR_IDLE_COLLECTION_MS, JSGC_SYSTEM_PAGE_SIZE_KB, JSGC_URGENT_THRESHOLD_MB, JSGC_MARKING_THREAD_COUNT, JSGC_PARALLEL_MARKING_THRESHOLD_KB,
}

Variants§

§

JSGC_MAX_BYTES

Maximum nominal heap before last ditch GC.

Soft limit on the number of bytes we are allowed to allocate in the GC heap. Attempts to allocate gcthings over this limit will return null and subsequently invoke the standard OOM machinery, independent of available physical memory.

Pref: javascript.options.mem.max Default: 0xffffffff

§

JSGC_MAX_NURSERY_BYTES

Maximum size of the generational GC nurseries.

This will be rounded to the nearest gc::ChunkSize.

Pref: javascript.options.mem.nursery.max_kb Default: JS::DefaultNurseryMaxBytes

§

JSGC_BYTES

Amount of bytes allocated by the GC.

§

JSGC_NUMBER

Number of times GC has been invoked. Includes both major and minor GC.

§

JSGC_INCREMENTAL_GC_ENABLED

Whether incremental GC is enabled. If not, GC will always run to completion.

prefs: javascript.options.mem.gc_incremental. Default: false

§

JSGC_PER_ZONE_GC_ENABLED

Whether per-zone GC is enabled. If not, all zones are collected every time.

prefs: javascript.options.mem.gc_per_zone Default: false

§

JSGC_UNUSED_CHUNKS

Number of cached empty GC chunks.

§

JSGC_TOTAL_CHUNKS

Total number of allocated GC chunks.

§

JSGC_SLICE_TIME_BUDGET_MS

Max milliseconds to spend in an incremental GC slice.

A value of zero means there is no maximum.

Pref: javascript.options.mem.gc_incremental_slice_ms Default: DefaultTimeBudgetMS.

§

JSGC_HIGH_FREQUENCY_TIME_LIMIT

GCs less than this far apart in milliseconds will be considered ‘high-frequency GCs’.

Pref: javascript.options.mem.gc_high_frequency_time_limit_ms Default: HighFrequencyThreshold

§

JSGC_SMALL_HEAP_SIZE_MAX

Upper limit for classifying a heap as small (MB).

Dynamic heap growth thresholds are based on whether the heap is small, medium or large. Heaps smaller than this size are classified as small; larger heaps are classified as medium or large.

Pref: javascript.options.mem.gc_small_heap_size_max_mb Default: SmallHeapSizeMaxBytes

§

JSGC_LARGE_HEAP_SIZE_MIN

Lower limit for classifying a heap as large (MB).

Dynamic heap growth thresholds are based on whether the heap is small, medium or large. Heaps larger than this size are classified as large; smaller heaps are classified as small or medium.

Pref: javascript.options.mem.gc_large_heap_size_min_mb Default: LargeHeapSizeMinBytes

§

JSGC_HIGH_FREQUENCY_SMALL_HEAP_GROWTH

Heap growth factor for small heaps in the high-frequency GC state.

Pref: javascript.options.mem.gc_high_frequency_small_heap_growth Default: HighFrequencySmallHeapGrowth

§

JSGC_HIGH_FREQUENCY_LARGE_HEAP_GROWTH

Heap growth factor for large heaps in the high-frequency GC state.

Pref: javascript.options.mem.gc_high_frequency_large_heap_growth Default: HighFrequencyLargeHeapGrowth

§

JSGC_LOW_FREQUENCY_HEAP_GROWTH

Heap growth factor for low frequency GCs.

This factor is applied regardless of the size of the heap when not in the high-frequency GC state.

Pref: javascript.options.mem.gc_low_frequency_heap_growth Default: LowFrequencyHeapGrowth

§

JSGC_BALANCED_HEAP_LIMITS_ENABLED

Whether balanced heap limits are enabled.

If this is set to true then heap limits are calculated in a way designed to balance memory usage optimally between many heaps.

Otherwise, heap limits are set based on a linear multiple of the retained size after the last collection.

Pref: javascript.options.mem.gc_balanced_heap_limits Default: BalancedHeapLimitsEnabled

§

JSGC_HEAP_GROWTH_FACTOR

Heap growth parameter for balanced heap limit calculation.

This parameter trades off GC time for memory usage. Smaller values result in lower memory use and larger values result in less time spent collecting.

Heap limits are set to the heap’s retained size plus some extra space. The extra space is calculated based on several factors but is scaled proportionally to this parameter.

Pref: javascript.options.mem.gc_heap_growth_factor Default: HeapGrowthFactor

§

JSGC_ALLOCATION_THRESHOLD

Lower limit for collecting a zone (MB).

Zones smaller than this size will not normally be collected.

Pref: javascript.options.mem.gc_allocation_threshold_mb Default GCZoneAllocThresholdBase

§

JSGC_MIN_EMPTY_CHUNK_COUNT

We try to keep at least this many unused chunks in the free chunk pool at all times, even after a shrinking GC.

Pref: javascript.options.mem.gc_min_empty_chunk_count Default: MinEmptyChunkCount

§

JSGC_MAX_EMPTY_CHUNK_COUNT

We never keep more than this many unused chunks in the free chunk pool.

Pref: javascript.options.mem.gc_max_empty_chunk_count Default: MaxEmptyChunkCount

§

JSGC_COMPACTING_ENABLED

Whether compacting GC is enabled.

Pref: javascript.options.mem.gc_compacting Default: CompactingEnabled

§

JSGC_PARALLEL_MARKING_ENABLED

Whether parallel marking is enabled.

Pref: javascript.options.mem.gc_parallel_marking Default: ParallelMarkingEnabled

§

JSGC_SMALL_HEAP_INCREMENTAL_LIMIT

Limit of how far over the incremental trigger threshold we allow the heap to grow before finishing a collection non-incrementally, for small heaps.

We trigger an incremental GC when a trigger threshold is reached but the collection may not be fast enough to keep up with the mutator. At some point we finish the collection non-incrementally.

Default: SmallHeapIncrementalLimit Pref: javascript.options.mem.gc_small_heap_incremental_limit

§

JSGC_LARGE_HEAP_INCREMENTAL_LIMIT

Limit of how far over the incremental trigger threshold we allow the heap to grow before finishing a collection non-incrementally, for large heaps.

Default: LargeHeapIncrementalLimit Pref: javascript.options.mem.gc_large_heap_incremental_limit

§

JSGC_NURSERY_FREE_THRESHOLD_FOR_IDLE_COLLECTION

Attempt to run a minor GC in the idle time if the free space falls below this number of bytes.

Default: NurseryChunkUsableSize / 4 Pref: None

§

JSGC_PRETENURE_THRESHOLD

If this percentage of the nursery is tenured and the nursery is at least 4MB, then proceed to examine which groups we should pretenure.

Default: PretenureThreshold Pref: None

§

JSGC_NURSERY_FREE_THRESHOLD_FOR_IDLE_COLLECTION_PERCENT

Attempt to run a minor GC in the idle time if the free space falls below this percentage (from 0 to 99).

Default: 25 Pref: None

§

JSGC_MIN_NURSERY_BYTES

Minimum size of the generational GC nurseries.

This value will be rounded to the nearest Nursery::SubChunkStep if below gc::ChunkSize, otherwise it’ll be rounded to the nearest gc::ChunkSize.

Default: Nursery::SubChunkLimit Pref: javascript.options.mem.nursery.min_kb

§

JSGC_MIN_LAST_DITCH_GC_PERIOD

The minimum time to allow between triggering last ditch GCs in seconds.

Default: 60 seconds Pref: None

§

JSGC_ZONE_ALLOC_DELAY_KB

The delay (in heapsize kilobytes) between slices of an incremental GC.

Default: ZoneAllocDelayBytes

§

JSGC_NURSERY_BYTES

The delay (in heapsize kilobytes) between slices of an incremental GC.

Default: ZoneAllocDelayBytes

§

JSGC_MALLOC_THRESHOLD_BASE

Retained size base value for calculating malloc heap threshold.

Default: MallocThresholdBase

§

JSGC_INCREMENTAL_WEAKMAP_ENABLED

Whether incremental weakmap marking is enabled.

Pref: javascript.options.mem.incremental_weakmap Default: IncrementalWeakMarkEnabled

§

JSGC_CHUNK_BYTES

The chunk size in bytes for this system.

This parameter is read-only.

§

JSGC_HELPER_THREAD_RATIO

The number of background threads to use for parallel GC work for each CPU core, expressed as an integer percentage.

Pref: javascript.options.mem.gc_helper_thread_ratio

§

JSGC_MAX_HELPER_THREADS

The maximum number of background threads to use for parallel GC work.

Pref: javascript.options.mem.gc_max_helper_threads

§

JSGC_HELPER_THREAD_COUNT

The number of background threads to use for parallel GC work.

This parameter is read-only and is set based on the JSGC_HELPER_THREAD_RATIO and JSGC_MAX_HELPER_THREADS parameters.

§

JSGC_PRETENURE_STRING_THRESHOLD

If the percentage of the tenured strings exceeds this threshold, string will be allocated in tenured heap instead. (Default is allocated in nursery.)

§

JSGC_STOP_PRETENURE_STRING_THRESHOLD

If the finalization rate of the tenured strings exceeds this threshold, string will be allocated in nursery.

§

JSGC_MAJOR_GC_NUMBER

A number that is incremented on every major GC slice.

§

JSGC_MINOR_GC_NUMBER

A number that is incremented on every minor GC.

§

JSGC_NURSERY_TIMEOUT_FOR_IDLE_COLLECTION_MS

JS::MaybeRunNurseryCollection will collect the nursery if it hasn’t been collected in this many milliseconds.

Default: 5000 Pref: None

§

JSGC_SYSTEM_PAGE_SIZE_KB

The system page size in KB.

This parameter is read-only.

§

JSGC_URGENT_THRESHOLD_MB

In an incremental GC, this determines the point at which to start increasing the slice budget and frequency of allocation triggered slices to try to avoid reaching the incremental limit and finishing the collection synchronously.

The threshold is calculated by subtracting this value from the heap’s incremental limit.

§

JSGC_MARKING_THREAD_COUNT

Set the number of threads to use for parallel marking, or zero to use the default.

The actual number used is capped to the number of available helper threads.

This is provided for testing purposes.

Pref: None. Default: 0 (no effect).

§

JSGC_PARALLEL_MARKING_THRESHOLD_KB

The heap size above which to use parallel marking.

Default: ParallelMarkingThresholdKB

Trait Implementations§

source§

impl Clone for JSGCParamKey

source§

fn clone(&self) -> JSGCParamKey

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for JSGCParamKey

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Hash for JSGCParamKey

source§

fn hash<__H>(&self, state: &mut __H)where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq<JSGCParamKey> for JSGCParamKey

source§

fn eq(&self, other: &JSGCParamKey) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for JSGCParamKey

source§

impl Eq for JSGCParamKey

source§

impl StructuralEq for JSGCParamKey

source§

impl StructuralPartialEq for JSGCParamKey

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.