[Webkit-unassigned] [Bug 85063] [BlackBerry] Add low memory check in ExecutableAllocator::underMemoryPressure() for BlackBerry platform

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 27 07:57:30 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=85063





--- Comment #3 from Antonio Gomes <tonikitoo at webkit.org>  2012-04-27 07:57:30 PST ---
(In reply to comment #2)
> +Filip and Michael
> 
> An alternative solution is create a ExecutableAllocatorBlackBerry.cpp, and put our underLowMemory() there. In ExecutableAllocator.cpp, we wrap the function with if !PLATFORM(BLACKBERRY). This pattern is widely used in other files like GraphicsContext.cpp IIRC.

ScrollView also do this.

Or something like:

<agomes> +static bool isOverlimit()
<agomes> +{
<agomes> +#if PLATFORM(BLACKBERRY)
<agomes> +     return BlackBerry::Platform::isMemoryLow();
<agomes> +#endif
<agomes> +
<agomes> +     return false;
<agomes> +}
<agomes> +
<agomes>  bool ExecutableAllocator::underMemoryPressure()
<agomes>  {
<agomes>  #ifdef EXECUTABLE_MEMORY_LIMIT
<agomes>      return DemandExecutableAllocator::bytesAllocatedByAllAllocators() > EXECUTABLE_MEMORY_LIMIT / 2;
<agomes>  #else
<agomes> -    return false;
<agomes> +    return isOverlimit();
<agomes>  #endif
<agomes>  }

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list