[Webkit-unassigned] [Bug 164052] [GTK] Since the memory pressure relief has been activated, my disk has a high usage and the desktop stalls
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Dec 28 10:40:53 PST 2016
https://bugs.webkit.org/show_bug.cgi?id=164052
Michael Catanzaro <mcatanzaro at igalia.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #294370|review? |review+
Flags| |
--- Comment #26 from Michael Catanzaro <mcatanzaro at igalia.com> ---
Comment on attachment 294370
--> https://bugs.webkit.org/attachment.cgi?id=294370
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=294370&action=review
> Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp:291
> + size_t processMemory = processMemoryUsage();
That reminds me that this function ought to return a pair of values now, see bug #165533. But that's a separate issue that doesn't have to be fixed here.
> Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp:293
> + int64_t bytesFreed = processMemory - processMemoryUsage();
Careful, you have integer underflow here, you have to cast either processMemory or processMemoryUsage to int64_t on the right hand side of the assignment as the result of the subtraction is a size_t. i.e. the value has already underflowed before it gets assigned to the int64_t. It might work properly on x86_64, but with a 32-bit size_t I think you'd wind up with a huge positive number for bytesFreed when it should be negative.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20161228/45773749/attachment.html>
More information about the webkit-unassigned
mailing list