Changeset 232117 in webkit


Ignore:
Timestamp:
May 23, 2018 10:39:03 AM (6 years ago)
Author:
Antti Koivisto
Message:

Increase the simulated memory size on PLATFORM(IOS_SIMULATOR) from 512MB to 1024MB
https://bugs.webkit.org/show_bug.cgi?id=185908

Reviewed by Geoffrey Garen.

Source/bmalloc:

We don't support 512MB devices anymore. This will make the simulator behave more
like a real device.

  • bmalloc/AvailableMemory.cpp:

(bmalloc::memorySizeAccordingToKernel):

Factor to a function.
Don't use availableMemoryGuess for the simulator value as it is not a guess.

(bmalloc::computeAvailableMemory):

Apply the same adjustments to the simulated value too.

LayoutTests:

  • platform/ios-simulator/fast/canvas/canvas-crash-expected.txt:
  • platform/ios-simulator/fast/canvas/canvas-skia-excessive-size-expected.txt:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r232116 r232117  
     12018-05-23  Antti Koivisto  <antti@apple.com>
     2
     3        Increase the simulated memory size on PLATFORM(IOS_SIMULATOR) from 512MB to 1024MB
     4        https://bugs.webkit.org/show_bug.cgi?id=185908
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        * platform/ios-simulator/fast/canvas/canvas-crash-expected.txt:
     9        * platform/ios-simulator/fast/canvas/canvas-skia-excessive-size-expected.txt:
     10
    1112018-05-23  Alicia Boya García  <aboya@igalia.com>
    212
  • trunk/LayoutTests/platform/ios-simulator/fast/canvas/canvas-crash-expected.txt

    r232113 r232117  
    1 CONSOLE MESSAGE: line 15: Total canvas memory use exceeds the maximum limit (256 MB).
     1CONSOLE MESSAGE: line 15: Total canvas memory use exceeds the maximum limit (448 MB).
    22CONSOLE MESSAGE: line 16: TypeError: null is not an object (evaluating 'ctx.putImageData')
    33
  • trunk/LayoutTests/platform/ios-simulator/fast/canvas/canvas-skia-excessive-size-expected.txt

    r232113 r232117  
    1 CONSOLE MESSAGE: line 20: Total canvas memory use exceeds the maximum limit (256 MB).
     1CONSOLE MESSAGE: line 20: Total canvas memory use exceeds the maximum limit (448 MB).
    22This test checks to see if the browser survives the attempted creation of an excessively large canvas.
    33
  • trunk/Source/bmalloc/ChangeLog

    r232069 r232117  
     12018-05-23  Antti Koivisto  <antti@apple.com>
     2
     3        Increase the simulated memory size on PLATFORM(IOS_SIMULATOR) from 512MB to 1024MB
     4        https://bugs.webkit.org/show_bug.cgi?id=185908
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        We don't support 512MB devices anymore. This will make the simulator behave more
     9        like a real device.
     10
     11        * bmalloc/AvailableMemory.cpp:
     12        (bmalloc::memorySizeAccordingToKernel):
     13
     14        Factor to a function.
     15        Don't use availableMemoryGuess for the simulator value as it is not a guess.
     16
     17        (bmalloc::computeAvailableMemory):
     18
     19        Apply the same adjustments to the simulated value too.
     20
    1212018-05-22  Ryan Haddad  <ryanhaddad@apple.com>
    222
  • trunk/Source/bmalloc/bmalloc/AvailableMemory.cpp

    r230187 r232117  
    4848static const size_t availableMemoryGuess = 512 * bmalloc::MB;
    4949
    50 static size_t computeAvailableMemory()
     50#if BOS(DARWIN)
     51static size_t memorySizeAccordingToKernel()
    5152{
    5253#if BPLATFORM(IOS_SIMULATOR)
    53     // Pretend we have 512MB of memory to make cache sizes behave like on device.
    54     return availableMemoryGuess;
    55 #elif BOS(DARWIN)
     54    BUNUSED_PARAM(availableMemoryGuess);
     55    // Pretend we have 1024MB of memory to make cache sizes behave like on device.
     56    return 1024 * bmalloc::MB;
     57#else
    5658    host_basic_info_data_t hostInfo;
    5759
     
    6264    if (r != KERN_SUCCESS)
    6365        return availableMemoryGuess;
    64    
     66
    6567    if (hostInfo.max_mem > std::numeric_limits<size_t>::max())
    6668        return std::numeric_limits<size_t>::max();
    6769
    68     size_t sizeAccordingToKernel = static_cast<size_t>(hostInfo.max_mem);
     70    return static_cast<size_t>(hostInfo.max_mem);
     71#endif
     72}
     73#endif
     74
     75static size_t computeAvailableMemory()
     76{
     77#if BOS(DARWIN)
     78    size_t sizeAccordingToKernel = memorySizeAccordingToKernel();
    6979#if BPLATFORM(IOS)
    7080    sizeAccordingToKernel = std::min(sizeAccordingToKernel, 840 * bmalloc::MB);
Note: See TracChangeset for help on using the changeset viewer.