Title: [234328] trunk/Source/bmalloc
Revision
234328
Author
[email protected]
Date
2018-07-27 14:20:22 -0700 (Fri, 27 Jul 2018)

Log Message

Explicitly handle memlimit_active < 0
https://bugs.webkit.org/show_bug.cgi?id=188125

Reviewed by Mark Lam.

This may come up during development when someone wants the limit
to be "infinite".

* bmalloc/AvailableMemory.cpp:
(bmalloc::jetsamLimit):

Modified Paths

Diff

Modified: trunk/Source/bmalloc/ChangeLog (234327 => 234328)


--- trunk/Source/bmalloc/ChangeLog	2018-07-27 20:50:01 UTC (rev 234327)
+++ trunk/Source/bmalloc/ChangeLog	2018-07-27 21:20:22 UTC (rev 234328)
@@ -1,5 +1,18 @@
 2018-07-27  Saam Barati  <[email protected]>
 
+        Explicitly handle memlimit_active < 0
+        https://bugs.webkit.org/show_bug.cgi?id=188125
+
+        Reviewed by Mark Lam.
+
+        This may come up during development when someone wants the limit
+        to be "infinite".
+
+        * bmalloc/AvailableMemory.cpp:
+        (bmalloc::jetsamLimit):
+
+2018-07-27  Saam Barati  <[email protected]>
+
         Use SPI to compute the jetsam limit on iOS instead of hardcoding 840MB
         https://bugs.webkit.org/show_bug.cgi?id=188091
         <rdar://problem/42647697>

Modified: trunk/Source/bmalloc/bmalloc/AvailableMemory.cpp (234327 => 234328)


--- trunk/Source/bmalloc/bmalloc/AvailableMemory.cpp	2018-07-27 20:50:01 UTC (rev 234327)
+++ trunk/Source/bmalloc/bmalloc/AvailableMemory.cpp	2018-07-27 21:20:22 UTC (rev 234328)
@@ -82,6 +82,8 @@
     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
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to