Since 2.34Optionalproperties: Partial<{}>Make a copy of settings.
A copy of of the passed WebKit.MemoryPressureSettings.
Free the WebKit.MemoryPressureSettings.
Gets the conservative memory usage threshold.
value in the (0, 1) range.
Gets the kill memory usage threshold.
positive value, can be zero.
Gets the memory usage limit.
current value, in megabytes.
Gets the interval at which memory usage is checked.
current interval value, in seconds.
Gets the strict memory usage threshold.
value in the (0, 1) range.
Sets the memory limit for the conservative policy to start working.
Sets value as the fraction of the defined memory limit where the conservative
policy starts working. This policy will try to reduce the memory footprint by
releasing non critical memory.
The threshold must be bigger than 0 and smaller than 1, and it must be smaller
than the strict threshold defined in settings. The default value is 0.33.
fraction of the memory limit where the conservative policy starts working.
Sets value as the fraction of the defined memory limit where the process will be
killed.
The threshold must be a value bigger or equal to 0. A value of 0 means that the process
is never killed. If the threshold is not 0, then it must be bigger than the strict threshold
defined in settings. The threshold can also have values bigger than 1. The default value is 0.
fraction of the memory limit where the process will be killed because of excessive memory usage.
Sets memory_limit the memory limit value to settings.
The default value is the system's RAM size with a maximum of 3GB.
amount of memory (in MB) that the process is allowed to use.
Sets value as the poll interval used by settings.
The poll interval value must be bigger than 0. The default value is 30 seconds.
period (in seconds) between memory usage measurements.
Sets the memory limit for the strict policy to start working.
Sets value as the fraction of the defined memory limit where the strict
policy starts working. This policy will try to reduce the memory footprint by
releasing critical memory.
The threshold must be bigger than 0 and smaller than 1. Also, it must be bigger
than the conservative threshold defined in settings, and smaller than the kill
threshold if the latter is not 0. The default value is 0.5.
fraction of the memory limit where the strict policy starts working.
Staticnew
A boxed type representing the settings for the memory pressure handler
WebKit.MemoryPressureSettings is a boxed type that can be used to provide some custom settings to control how the memory pressure situations are handled by the different processes.
The memory pressure system implemented inside the different process will try to keep the memory usage under the defined memory limit. In order to do that, it will check the used memory with a user defined frequency and decide whether it should try to release memory. The thresholds passed will define how urgent is to release that memory.
Take into account that badly defined parameters can greatly reduce the performance of the engine. For example, setting memory limit too low with a fast poll interval can cause the process to constantly be trying to release memory.
A WebKit.MemoryPressureSettings can be passed to a WebKit.WebContext constructor, and the settings will be applied to all the web processes created by that context.
A WebKit.MemoryPressureSettings can be passed to
webkit_website_data_manager_set_memory_pressure_settings(), and the settings will be applied to all the network processes created after that call by any instance of WebKit.WebsiteDataManager.Since
2.34