Bug 146685 - [Win] Add memory pressure handler.
Summary: [Win] Add memory pressure handler.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-07 10:46 PDT by peavo
Modified: 2015-07-09 13:38 PDT (History)
5 users (show)

See Also:


Attachments
Patch (11.16 KB, patch)
2015-07-07 11:10 PDT, peavo
no flags Details | Formatted Diff | Diff
Patch (11.91 KB, patch)
2015-07-08 14:04 PDT, peavo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description peavo 2015-07-07 10:46:04 PDT
Windows does not yet have a memory pressure handler implementation.
Comment 1 peavo 2015-07-07 11:10:29 PDT
Created attachment 256309 [details]
Patch
Comment 2 Alex Christensen 2015-07-07 11:39:48 PDT
Comment on attachment 256309 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=256309&action=review

> Source/WebCore/platform/win/MemoryPressureHandlerWin.cpp:85
> +    // Only install a memory check timer for Win32, since Win64 has much more memory to play with.

This is not necessarily true.  64-bit windows can be installed on systems with 1GB of memory, for example.  I don't think the memory pressure handler should be 32-bit only.

> Source/WebCore/platform/win/MemoryPressureHandlerWin.cpp:88
> +    memCheckTimer()->startRepeating(60.0);

This just checks the memory every minute, right?
Comment 3 peavo 2015-07-07 12:53:06 PDT
(In reply to comment #2)
> 

Thanks for reviewing :)

> > Source/WebCore/platform/win/MemoryPressureHandlerWin.cpp:85
> > +    // Only install a memory check timer for Win32, since Win64 has much more memory to play with.
> 
> This is not necessarily true.  64-bit windows can be installed on systems
> with 1GB of memory, for example.  I don't think the memory pressure handler
> should be 32-bit only.
> 

I agree, I will update the patch.

> > Source/WebCore/platform/win/MemoryPressureHandlerWin.cpp:88
> > +    memCheckTimer()->startRepeating(60.0);
> 
> This just checks the memory every minute, right?

Yes.
Comment 4 peavo 2015-07-08 14:04:32 PDT
Created attachment 256404 [details]
Patch
Comment 5 Brent Fulgham 2015-07-09 09:33:39 PDT
Comment on attachment 256404 [details]
Patch

Very nice! r=me.
Comment 6 peavo 2015-07-09 10:08:15 PDT
(In reply to comment #5)
> Comment on attachment 256404 [details]
> Patch
> 
> Very nice! r=me.

Thanks!
Comment 7 WebKit Commit Bot 2015-07-09 13:38:55 PDT
Comment on attachment 256404 [details]
Patch

Clearing flags on attachment: 256404

Committed r186607: <http://trac.webkit.org/changeset/186607>
Comment 8 WebKit Commit Bot 2015-07-09 13:38:59 PDT
All reviewed patches have been landed.  Closing bug.