WebKit Bugzilla
Attachment 341080 Details for
Bug 185908
: Increase the simulated memory size on PLATFORM(IOS_SIMULATOR) from 512MB to 1024MB
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
simulator-memory-size.patch (text/plain), 2.48 KB, created by
Antti Koivisto
on 2018-05-23 03:23:54 PDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Antti Koivisto
Created:
2018-05-23 03:23:54 PDT
Size:
2.48 KB
patch
obsolete
>Index: Source/bmalloc/ChangeLog >=================================================================== >--- Source/bmalloc/ChangeLog (revision 232107) >+++ Source/bmalloc/ChangeLog (working copy) >@@ -1,3 +1,23 @@ >+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 NOBODY (OOPS!). >+ >+ 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. >Index: Source/bmalloc/bmalloc/AvailableMemory.cpp >=================================================================== >--- Source/bmalloc/bmalloc/AvailableMemory.cpp (revision 231847) >+++ Source/bmalloc/bmalloc/AvailableMemory.cpp (working copy) >@@ -47,12 +47,14 @@ namespace bmalloc { > > 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(); >@@ -61,11 +63,19 @@ static size_t computeAvailableMemory() > 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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185908
:
341080
|
341098