Bug 146685

Summary: [Win] Add memory pressure handler.
Product: WebKit Reporter: peavo
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, bfulgham, commit-queue, dbates, kling
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

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.