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:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232117
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2018-05-23 Antti Koivisto <antti@apple.com>
+
+ 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.
+
+ * platform/ios-simulator/fast/canvas/canvas-crash-expected.txt:
+ * platform/ios-simulator/fast/canvas/canvas-skia-excessive-size-expected.txt:
+
2018-05-23 Alicia Boya GarcĂa <aboya@igalia.com>
[GTK] Unreviewed test gardening
-CONSOLE MESSAGE: line 15: Total canvas memory use exceeds the maximum limit (256 MB).
+CONSOLE MESSAGE: line 15: Total canvas memory use exceeds the maximum limit (448 MB).
CONSOLE MESSAGE: line 16: TypeError: null is not an object (evaluating 'ctx.putImageData')
-CONSOLE MESSAGE: line 20: Total canvas memory use exceeds the maximum limit (256 MB).
+CONSOLE MESSAGE: line 20: Total canvas memory use exceeds the maximum limit (448 MB).
This test checks to see if the browser survives the attempted creation of an excessively large canvas.
Canvas 2d context = null!
+2018-05-23 Antti Koivisto <antti@apple.com>
+
+ 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.
+
+ 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.
+
2018-05-22 Ryan Haddad <ryanhaddad@apple.com>
Unreviewed, rolling out r232052.
static const size_t availableMemoryGuess = 512 * bmalloc::MB;
-static size_t computeAvailableMemory()
+#if BOS(DARWIN)
+static size_t memorySizeAccordingToKernel()
{
#if BPLATFORM(IOS_SIMULATOR)
- // Pretend we have 512MB of memory to make cache sizes behave like on device.
- return availableMemoryGuess;
-#elif BOS(DARWIN)
+ BUNUSED_PARAM(availableMemoryGuess);
+ // Pretend we have 1024MB of memory to make cache sizes behave like on device.
+ return 1024 * bmalloc::MB;
+#else
host_basic_info_data_t hostInfo;
mach_port_t host = mach_host_self();
mach_port_deallocate(mach_task_self(), host);
if (r != KERN_SUCCESS)
return availableMemoryGuess;
-
+
if (hostInfo.max_mem > std::numeric_limits<size_t>::max())
return std::numeric_limits<size_t>::max();
- size_t sizeAccordingToKernel = static_cast<size_t>(hostInfo.max_mem);
+ return static_cast<size_t>(hostInfo.max_mem);
+#endif
+}
+#endif
+
+static size_t computeAvailableMemory()
+{
+#if BOS(DARWIN)
+ size_t sizeAccordingToKernel = memorySizeAccordingToKernel();
#if BPLATFORM(IOS)
sizeAccordingToKernel = std::min(sizeAccordingToKernel, 840 * bmalloc::MB);
#endif