Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3f0e0215b031ad68656ece5dd8181cfaa3a78c64
      
https://github.com/WebKit/WebKit/commit/3f0e0215b031ad68656ece5dd8181cfaa3a78c64
  Author: Vitaly Dyachkov <[email protected]>
  Date:   2026-01-23 (Fri, 23 Jan 2026)

  Changed paths:
    M Source/WTF/wtf/unix/MemoryPressureHandlerUnix.cpp

  Log Message:
  -----------
  [Linux] `MemoryPressureHandler::ReliefLogger::platformMemoryUsage()` result 
is inconsistent
https://bugs.webkit.org/show_bug.cgi?id=306031

Reviewed by Miguel Gomez.

`MemoryPressureHandler::ReliefLogger::platformMemoryUsage()` on Linux
returns `MemoryUsage {processMemoryUsage(), memoryFootprint()}`. Both
functions call `currentProcessMemoryStatus()` internally and return
parts of the returned `ProcessMemoryStatus` structure, with the
difference that `memoryFootprint()` returns a cached value and
`processMemoryUsage()` not.

We can instead call `currentProcessMemoryStatus()` directly. This way
both values will be consistent with each other. It also avoids the
extra overhead of calling parsing `/proc/self/statm` twice.

* Source/WTF/wtf/unix/MemoryPressureHandlerUnix.cpp:
(WTF::MemoryPressureHandler::ReliefLogger::platformMemoryUsage):

Canonical link: https://commits.webkit.org/306065@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to