WebKit Bugzilla
Attachment 345952 Details for
Bug 188125
: Explicitly handle memlimit_active < 0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
c-backup.diff (text/plain), 1.32 KB, created by
Saam Barati
on 2018-07-27 14:14:59 PDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Saam Barati
Created:
2018-07-27 14:14:59 PDT
Size:
1.32 KB
patch
obsolete
>Index: Source/bmalloc/ChangeLog >=================================================================== >--- Source/bmalloc/ChangeLog (revision 234327) >+++ Source/bmalloc/ChangeLog (working copy) >@@ -1,3 +1,16 @@ >+2018-07-27 Saam Barati <sbarati@apple.com> >+ >+ Explicitly handle memlimit_active < 0 >+ https://bugs.webkit.org/show_bug.cgi?id=188125 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This may come up during development when someone wants the limit >+ to be "infinite". >+ >+ * bmalloc/AvailableMemory.cpp: >+ (bmalloc::jetsamLimit): >+ > 2018-07-27 Saam Barati <sbarati@apple.com> > > Use SPI to compute the jetsam limit on iOS instead of hardcoding 840MB >Index: Source/bmalloc/bmalloc/AvailableMemory.cpp >=================================================================== >--- Source/bmalloc/bmalloc/AvailableMemory.cpp (revision 234327) >+++ Source/bmalloc/bmalloc/AvailableMemory.cpp (working copy) >@@ -82,6 +82,8 @@ static size_t jetsamLimit() > pid_t pid = getpid(); > if (memorystatus_control(MEMORYSTATUS_CMD_GET_MEMLIMIT_PROPERTIES, pid, 0, &properties, sizeof(properties))) > return 840 * bmalloc::MB; >+ if (properties.memlimit_active < 0) >+ return std::numeric_limits<size_t>::max(); > return static_cast<size_t>(properties.memlimit_active) * 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
Flags:
mark.lam
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188125
: 345952