Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7ad86054636f7249776d73ae651ecbf49d2f0837
      
https://github.com/WebKit/WebKit/commit/7ad86054636f7249776d73ae651ecbf49d2f0837
  Author: Claudio Saavedra <[email protected]>
  Date:   2026-09-18 (Fri, 18 Sep 2026)

  Changed paths:
    M Source/WebKit/UIProcess/linux/MemoryPressureMonitor.cpp
    M Source/WebKit/UIProcess/linux/MemoryPressureMonitor.h

  Log Message:
  -----------
  [GLib] Use UTF8CString for the cgroup controller path in MemoryPressureMonitor
https://bugs.webkit.org/show_bug.cgi?id=324563

Reviewed by Adrian Perez de Castro.

The cgroup memory controller path is read from /proc/self/cgroup and kept as a
CString; the controller and file names it is combined with are literals that
were copied into CString temporaries on every setMemoryControllerPath(). Type
the path as UTF8CString, following the convention fileSystemRepresentation()
sets for paths, and take the literals as ASCIILiteral.

getCgroupFile() composed the sysfs path with snprintf into a fixed buffer; it
now uses makeString(), which produces the same bytes without the format string
or the length limit.

* Source/WebKit/UIProcess/linux/MemoryPressureMonitor.cpp:
(WebKit::getCgroupFile):
(WebKit::getCgroupControllerPath):
(WebKit::MemoryPressureMonitor::start):
(WebKit::CGroupMemoryController::setMemoryControllerPath):
* Source/WebKit/UIProcess/linux/MemoryPressureMonitor.h:

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



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

Reply via email to