<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - MemoryPressureHandler doesn't work if cgroups aren't present in Linux"
   href="https://bugs.webkit.org/show_bug.cgi?id=155255#c21">Comment # 21</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - MemoryPressureHandler doesn't work if cgroups aren't present in Linux"
   href="https://bugs.webkit.org/show_bug.cgi?id=155255">bug 155255</a>
              from <span class="vcard"><a class="email" href="mailto:eocanha&#64;igalia.com" title="Enrique Ocaña &lt;eocanha&#64;igalia.com&gt;"> <span class="fn">Enrique Ocaña</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=155255#c16">comment #16</a>)

<span class="quote">&gt; In any case, if battery usage is more worrying than OOM for battery-backed
&gt; devices, what about reading some environment variables when the object is
&gt; created and enable polling on demand? We could even parameterize the memory
&gt; limits (per each process) if we use env vars.</span >

Nobody commented anything about this proposal of using an environment variable to enable and parameterize the new memory measurement alternative. It would be disabled if there's no environment variable defined and enabled otherwise. An example of how this environment variable could be defined:

export MEMORY_PRESSURE_HANDLER_MEMINFO=MiniBrowser:500M,WebProcess:100M/20M,*Process:500M/100M

The pattern is: MEMORY_PRESSURE_HANDLER_MEMINFO=&lt;process-name-pattern&gt;:[&lt;optional-non-critical-limit&gt;/]&lt;critical-limit&gt;, ...

I think this alternative would make everybody happy: no battery drain by default (when the variable isn't defined), and the memory exhaustion problem solved &quot;if it's important enough for your use case and you know what you're doing&quot;.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>