Branch: refs/heads/webkitglib/2.54
  Home:   https://github.com/WebKit/WebKit
  Commit: 1f4aeb2b2d057febf135f67b7de8024a30fe0506
      
https://github.com/WebKit/WebKit/commit/1f4aeb2b2d057febf135f67b7de8024a30fe0506
  Author: Claudio Saavedra <[email protected]>
  Date:   2026-10-03 (Sat, 03 Oct 2026)

  Changed paths:
    M Source/WTF/wtf/AvailableMemory.cpp

  Log Message:
  -----------
  REGRESSION(306653@main): [WTF] Linux memory footprint always reads as zero
https://bugs.webkit.org/show_bug.cgi?id=326184

Reviewed by Adrian Perez de Castro.

LinuxMemory::footprint() parses the resident field of /proc/self/statm with
parseInteger(), which rejects any input that has characters after the
number. The statm line always continues with five more fields, so the parse
fails and value_or(0) makes memoryStatus() report a footprint of zero. The
only consumer, Heap::overCriticalMemoryThreshold(), therefore never sees the
process cross Options::criticalGCMemoryThreshold() on GTK and WPE. Use
parseIntegerAllowingTrailingJunk(), which stops at the first non-digit as
the strtoul() call it replaced did.

main no longer has this code: 322403@main removed LinuxMemory and routes the
heap through memoryFootprint() instead.

* Source/WTF/wtf/AvailableMemory.cpp:
(WTF::LinuxMemory::footprint):

Canonical link: https://commits.webkit.org/317695.397@webkitglib/2.54



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

Reply via email to