MemoryPressureSettings

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.

Constructors

this
this(void* ptr, Flag!"Take" take)
this
this()

Create a new #WebKitMemoryPressureSettings with the default values.

Members

Functions

cPtr
void* cPtr(Flag!"Dup" dup)
copy
webkit.memory_pressure_settings.MemoryPressureSettings copy()

Make a copy of settings.

getConservativeThreshold
double getConservativeThreshold()

Gets the conservative memory usage threshold.

getKillThreshold
double getKillThreshold()

Gets the kill memory usage threshold.

getMemoryLimit
uint getMemoryLimit()

Gets the memory usage limit.

getPollInterval
double getPollInterval()

Gets the interval at which memory usage is checked.

getStrictThreshold
double getStrictThreshold()

Gets the strict memory usage threshold.

self
MemoryPressureSettings self()

Returns this, for use in with statements.

setConservativeThreshold
void setConservativeThreshold(double value)

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

setKillThreshold
void setKillThreshold(double value)

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

setMemoryLimit
void setMemoryLimit(uint memoryLimit)

Sets memory_limit the memory limit value to settings.

setPollInterval
void setPollInterval(double value)

Sets value as the poll interval used by settings.

setStrictThreshold
void setStrictThreshold(double value)

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

Properties

gType
GType gType [@property getter]

Static functions

getGType
GType getGType()

Inherited Members

From Boxed

cInstancePtr
void* cInstancePtr;

Pointer to the C boxed value

getType
GType getType()

Get the GType of this boxed type.

gType
GType gType [@property getter]

Boxed GType property.

self
Boxed self()

Convenience method to return this cast to a type. For use in D with statements.

copy_
void* copy_()

Make a copy of the wrapped C boxed data.

boxedCopy
void* boxedCopy(void* cBoxed)

Copy a C boxed value using g_boxed_copy.

boxedFree
void boxedFree(void* cBoxed)

Free a C boxed value using g_boxed_free.