ClearScript Library
ClearScript Library
ClearScript Library Reference
Microsoft.ClearScript.V8
V8RuntimeConstraints Class
V8RuntimeConstraints Properties
HeapExpansionMultiplier Property
MaxArrayBufferAllocation Property
MaxExecutableSize Property
MaxNewSpaceSize Property
MaxOldSpaceSize Property
MaxYoungSpaceSize Property

# V8RuntimeConstraintsHeapExpansionMultiplier Property

Gets or sets the heap expansion multiplier.
Namespace: Microsoft.ClearScript.V8
Assembly: ClearScript.V8 (in ClearScript.V8.dll) Version: 7.5.0
Syntax
C#
VB
C++
F#
Copy

    public double HeapExpansionMultiplier { get; set; }

    Public Property HeapExpansionMultiplier As Double
    	Get
    	Set

    public:
    property double HeapExpansionMultiplier {
    	double get ();
    	void set (double value);
    }

    member HeapExpansionMultiplier : float with get, set

#### Property Value

Double
Remarks
When set to a value greater than 1, this property enables on-demand heap expansion, which automatically increases the maximum heap size by the specified multiplier whenever the script engine is close to exceeding the current limit. Note that a buggy or malicious script can still cause an application to fail by exhausting its address space or total available memory. On-demand heap expansion is recommended for use in conjunction with heap size monitoring (see MaxHeapSize, MaxRuntimeHeapSize) to help contain runaway scripts.
See Also

#### Reference

V8RuntimeConstraints Class
Microsoft.ClearScript.V8 Namespace

Copyright © Microsoft Corporation. All rights reserved.

Send comments on this topic to Microsoft