MemoryPressureSettings

class MemoryPressureSettings(pointer: <Error class: unknown class><<Error class: unknown class>>)

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.

Since

2.34

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val webkitMemoryPressureSettingsPointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard

Make a copy of @settings.

Link copied to clipboard
fun free()

Free the #WebKitMemoryPressureSettings.

Link copied to clipboard
fun getConservativeThreshold(): <Error class: unknown class>

Gets the conservative memory usage threshold.

Link copied to clipboard
fun getKillThreshold(): <Error class: unknown class>

Gets the kill memory usage threshold.

Link copied to clipboard
fun getMemoryLimit(): <Error class: unknown class>

Gets the memory usage limit.

Link copied to clipboard
fun getPollInterval(): <Error class: unknown class>

Gets the interval at which memory usage is checked.

Link copied to clipboard
fun getStrictThreshold(): <Error class: unknown class>

Gets the strict memory usage threshold.

Link copied to clipboard
fun setConservativeThreshold(value: <Error class: unknown class>)

Sets the memory limit for the conservative policy to start working.

Link copied to clipboard
fun setKillThreshold(value: <Error class: unknown class>)

Sets @value as the fraction of the defined memory limit where the process will be killed.

Link copied to clipboard
fun setMemoryLimit(memoryLimit: <Error class: unknown class>)

Sets @memory_limit the memory limit value to @settings.

Link copied to clipboard
fun setPollInterval(value: <Error class: unknown class>)

Sets @value as the poll interval used by @settings.

Link copied to clipboard
fun setStrictThreshold(value: <Error class: unknown class>)

Sets the memory limit for the strict policy to start working.