1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381
|
<!--
SPDX-FileCopyrightText: The WebKit GTK and WPE teams
SPDX-License-Identifier: BSD, LGPL-2.1
-->
<!DOCTYPE html>
<html lang="en">
<head>
<title>WPEWebKit.MemoryPressureSettings</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8" />
<meta property="og:type" content="website"/>
<meta property="og:title" content="WPEWebKit.MemoryPressureSettings"/>
<meta property="og:description" content="Reference for WPEWebKit.MemoryPressureSettings"/>
<meta name="twitter:title" content="WPEWebKit.MemoryPressureSettings"/>
<meta name="twitter:description" content="Reference for WPEWebKit.MemoryPressureSettings"/>
<meta name="twitter:card" content="summary"/>
<link rel="stylesheet" href="style.css" type="text/css" />
<script src="wpe2-urlmap.js"></script>
<script src="fzy.js"></script>
<script src="search.js"></script>
<script src="main.js"></script>
</head>
<body>
<div id="body-wrapper" tabindex="-1">
<nav class="sidebar devhelp-hidden">
<div class="search section">
<form id="search-form" autocomplete="off">
<input id="search-input" type="text" name="do-not-autocomplete" placeholder="Click, or press 's' to search" autocomplete="off"/>
</form>
</div>
<div class="section namespace">
<h3><a href="index.html">WPEWebKit</a></h3>
<p>API Version: 2.0</p>
<p>Library Version: 2.50.5</p>
</div>
<div class="section">
<h5>Type</h5>
<div class="links">
<a class="current" href="struct.MemoryPressureSettings.html#description">MemoryPressureSettings</a>
</div>
</div>
<div class="section">
<h5>Constructors</h5>
<div class="links">
<a class="ctor" href="ctor.MemoryPressureSettings.new.html">new</a>
</div>
</div>
<div class="section">
<h5>Instance methods</h5>
<div class="links">
<a class="method" href="method.MemoryPressureSettings.copy.html">copy</a>
<a class="method" href="method.MemoryPressureSettings.free.html">free</a>
<a class="method" href="method.MemoryPressureSettings.get_conservative_threshold.html">get_conservative_threshold</a>
<a class="method" href="method.MemoryPressureSettings.get_kill_threshold.html">get_kill_threshold</a>
<a class="method" href="method.MemoryPressureSettings.get_memory_limit.html">get_memory_limit</a>
<a class="method" href="method.MemoryPressureSettings.get_poll_interval.html">get_poll_interval</a>
<a class="method" href="method.MemoryPressureSettings.get_strict_threshold.html">get_strict_threshold</a>
<a class="method" href="method.MemoryPressureSettings.set_conservative_threshold.html">set_conservative_threshold</a>
<a class="method" href="method.MemoryPressureSettings.set_kill_threshold.html">set_kill_threshold</a>
<a class="method" href="method.MemoryPressureSettings.set_memory_limit.html">set_memory_limit</a>
<a class="method" href="method.MemoryPressureSettings.set_poll_interval.html">set_poll_interval</a>
<a class="method" href="method.MemoryPressureSettings.set_strict_threshold.html">set_strict_threshold</a>
</div>
</div>
<div class="section generator">
<p>Generated by <a href="https://gitlab.gnome.org/GNOME/gi-docgen">gi-docgen</a> 2023.1</p>
</div>
</nav>
<button id="btn-to-top" class="hidden"><span class="up-arrow"></span></button>
<section id="main" class="content">
<header>
<h3>Struct</h3>
<h1><a href="index.html">WPEWebKit</a><span class="sep"></span>MemoryPressureSettings</h1>
</header>
<section>
<summary>
<div class="docblock">
<p><span class="emblem available">since: 2.34</span></p>
</div>
<div class="toggle-wrapper">
<h4 style="display:flex;" id="description">
Description
<a href="#description" class="anchor"></a>
<a class="srclink" title="go to source location" href="https://github.com/WebKit/WebKit/tree/main/Source/WebKit/UIProcess/API/glib/WebKitMemoryPressureSettings.cpp#L25">[src]</a>
</h4>
<pre><code><div class="highlight"><pre><span></span><span class="k">struct</span><span class="w"> </span><span class="nc">WebKitMemoryPressureSettings</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="cm">/* No available fields */</span>
<span class="p">}</span>
</pre></div>
</code></pre>
<div class="docblock">
<p>A boxed type representing the settings for the memory pressure handler</p>
<p><code>WebKitMemoryPressureSettings</code> 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.</p>
<p>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.</p>
<p>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.</p>
<p>A <code>WebKitMemoryPressureSettings</code> can be passed to a <code>WebKitWebContext</code> constructor, and the settings will
be applied to all the web processes created by that context.</p>
<p>A <code>WebKitMemoryPressureSettings</code> 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
<code>WebKitWebsiteDataManager</code>.</p>
</div>
<div class="docblock">
<p>Available since: 2.34</p>
</div>
</div>
</summary>
<div class="toggle-wrapper constructors">
<h4 id="constructors">
Constructors
<a href="#constructors" class="anchor"></a>
</h4>
<div class="docblock">
<div class="">
<h6><a href="ctor.MemoryPressureSettings.new.html">webkit_memory_pressure_settings_new</a></h6>
<div class="docblock">
<p>Create a new <code>WebKitMemoryPressureSettings</code> with the default values.</p>
</div>
<div class="docblock">
<p><span class="emblem available">since: 2.34</span></p>
</div>
</div>
</div>
</div>
<div class="toggle-wrapper methods">
<h4 id="methods">
Instance methods
<a href="#methods" class="anchor"></a>
</h4>
<div class="docblock">
<div class="">
<h6><a href="method.MemoryPressureSettings.copy.html">webkit_memory_pressure_settings_copy</a></h6>
<div class="docblock">
<p>Make a copy of <code>settings</code>.</p>
</div>
<div class="docblock">
<p><span class="emblem available">since: 2.34</span></p>
</div>
</div>
<div class="">
<h6><a href="method.MemoryPressureSettings.free.html">webkit_memory_pressure_settings_free</a></h6>
<div class="docblock">
<p>Free the <code>WebKitMemoryPressureSettings</code>.</p>
</div>
<div class="docblock">
<p><span class="emblem available">since: 2.34</span></p>
</div>
</div>
<div class="">
<h6><a href="method.MemoryPressureSettings.get_conservative_threshold.html">webkit_memory_pressure_settings_get_conservative_threshold</a></h6>
<div class="docblock">
<p>Gets the conservative memory usage threshold.</p>
</div>
<div class="docblock">
<p><span class="emblem available">since: 2.34</span></p>
</div>
</div>
<div class="">
<h6><a href="method.MemoryPressureSettings.get_kill_threshold.html">webkit_memory_pressure_settings_get_kill_threshold</a></h6>
<div class="docblock">
<p>Gets the kill memory usage threshold.</p>
</div>
<div class="docblock">
<p><span class="emblem available">since: 2.34</span></p>
</div>
</div>
<div class="">
<h6><a href="method.MemoryPressureSettings.get_memory_limit.html">webkit_memory_pressure_settings_get_memory_limit</a></h6>
<div class="docblock">
<p>Gets the memory usage limit.</p>
</div>
<div class="docblock">
<p><span class="emblem available">since: 2.34</span></p>
</div>
</div>
<div class="">
<h6><a href="method.MemoryPressureSettings.get_poll_interval.html">webkit_memory_pressure_settings_get_poll_interval</a></h6>
<div class="docblock">
<p>Gets the interval at which memory usage is checked.</p>
</div>
<div class="docblock">
<p><span class="emblem available">since: 2.34</span></p>
</div>
</div>
<div class="">
<h6><a href="method.MemoryPressureSettings.get_strict_threshold.html">webkit_memory_pressure_settings_get_strict_threshold</a></h6>
<div class="docblock">
<p>Gets the strict memory usage threshold.</p>
</div>
<div class="docblock">
<p><span class="emblem available">since: 2.34</span></p>
</div>
</div>
<div class="">
<h6><a href="method.MemoryPressureSettings.set_conservative_threshold.html">webkit_memory_pressure_settings_set_conservative_threshold</a></h6>
<div class="docblock">
<p>Sets the memory limit for the conservative policy to start working.</p>
</div>
<div class="docblock">
<p><span class="emblem available">since: 2.34</span></p>
</div>
</div>
<div class="">
<h6><a href="method.MemoryPressureSettings.set_kill_threshold.html">webkit_memory_pressure_settings_set_kill_threshold</a></h6>
<div class="docblock">
<p>Sets <code>value</code> as the fraction of the defined memory limit where the process will be killed.</p>
</div>
<div class="docblock">
<p><span class="emblem available">since: 2.34</span></p>
</div>
</div>
<div class="">
<h6><a href="method.MemoryPressureSettings.set_memory_limit.html">webkit_memory_pressure_settings_set_memory_limit</a></h6>
<div class="docblock">
<p>Sets <code>memory_limit</code> the memory limit value to <code>settings</code>.</p>
</div>
<div class="docblock">
<p><span class="emblem available">since: 2.34</span></p>
</div>
</div>
<div class="">
<h6><a href="method.MemoryPressureSettings.set_poll_interval.html">webkit_memory_pressure_settings_set_poll_interval</a></h6>
<div class="docblock">
<p>Sets <code>value</code> as the poll interval used by <code>settings</code>.</p>
</div>
<div class="docblock">
<p><span class="emblem available">since: 2.34</span></p>
</div>
</div>
<div class="">
<h6><a href="method.MemoryPressureSettings.set_strict_threshold.html">webkit_memory_pressure_settings_set_strict_threshold</a></h6>
<div class="docblock">
<p>Sets the memory limit for the strict policy to start working.</p>
</div>
<div class="docblock">
<p><span class="emblem available">since: 2.34</span></p>
</div>
</div>
</div>
</div>
</section>
</section>
<div id="toc" class="toc">
<nav aria-labelledby="toc-title">
<p id="toc-title">Content</p>
<ul class="toc-list">
<li class="toc-list-item"><a href="#description"><span class="link-text">Description</span></a></li>
<li class="toc-list-item"><a href="#constructors"><span class="link-text">Constructors</span></a></li>
<li class="toc-list-item"><a href="#methods"><span class="link-text">Methods</span></a></li>
</ul>
</nav>
</div>
<section id="search" class="content hidden"></section>
<footer>
</footer>
</div>
</body>
</html>
|