webkit.memory_pressure_settings
Module for [MemoryPressureSettings] class
Types 1
A boxed type representing the settings for the memory pressure handler
#WebKitMemoryPressureSettings 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 #WebKitMemoryPressureSettings can be passed to a #WebKitWebContext constructor, and the settings will be applied to all the web processes created by that context.
A #WebKitMemoryPressureSettings 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 #WebKitWebsiteDataManager.
webkit.memory_pressure_settings.MemoryPressureSettings copy() nothrowMake a copy of settings. Returns: A copy of of the passed #WebKitMemoryPressureSettings.double getConservativeThreshold() nothrowGets the conservative memory usage threshold. Returns: value in the `(0, 1)` range.double getKillThreshold() nothrowGets the kill memory usage threshold. Returns: positive value, can be zero.double getPollInterval() nothrowGets the interval at which memory usage is checked. Returns: current interval value, in seconds.double getStrictThreshold() nothrowGets the strict memory usage threshold. Returns: value in the `(0, 1)` range.void setConservativeThreshold(double value) nothrowSets the memory limit for the conservative policy to start working.void setKillThreshold(double value) nothrowSets value as the fraction of the defined memory limit where the process will be killed.void setStrictThreshold(double value) nothrowSets the memory limit for the strict policy to start working.