Title: [232059] trunk/Source/bmalloc
- Revision
- 232059
- Author
- [email protected]
- Date
- 2018-05-22 03:49:17 -0700 (Tue, 22 May 2018)
Log Message
Define GIGACAGE_ALLOCATION_CAN_FAIL on Linux
https://bugs.webkit.org/show_bug.cgi?id=183329
Reviewed by Michael Catanzaro.
We specify `GIGACAGE_ALLOCATION_CAN_FAIL 1` in Linux since
Linux can fail to `mmap` if `vm.overcommit_memory = 2`.
Users can enable Gigacage if users enable overcommit_memory.
* bmalloc/Gigacage.h:
Modified Paths
Diff
Modified: trunk/Source/bmalloc/ChangeLog (232058 => 232059)
--- trunk/Source/bmalloc/ChangeLog 2018-05-22 09:32:46 UTC (rev 232058)
+++ trunk/Source/bmalloc/ChangeLog 2018-05-22 10:49:17 UTC (rev 232059)
@@ -1,3 +1,16 @@
+2018-05-22 Yusuke Suzuki <[email protected]>
+
+ Define GIGACAGE_ALLOCATION_CAN_FAIL on Linux
+ https://bugs.webkit.org/show_bug.cgi?id=183329
+
+ Reviewed by Michael Catanzaro.
+
+ We specify `GIGACAGE_ALLOCATION_CAN_FAIL 1` in Linux since
+ Linux can fail to `mmap` if `vm.overcommit_memory = 2`.
+ Users can enable Gigacage if users enable overcommit_memory.
+
+ * bmalloc/Gigacage.h:
+
2018-05-21 Yusuke Suzuki <[email protected]>
Use more C++17
Modified: trunk/Source/bmalloc/bmalloc/Gigacage.h (232058 => 232059)
--- trunk/Source/bmalloc/bmalloc/Gigacage.h 2018-05-22 09:32:46 UTC (rev 232058)
+++ trunk/Source/bmalloc/bmalloc/Gigacage.h 2018-05-22 10:49:17 UTC (rev 232059)
@@ -43,6 +43,13 @@
#define GIGACAGE_ALLOCATION_CAN_FAIL 0
#endif
+// In Linux, if `vm.overcommit_memory = 2` is specified, mmap with large size can fail if it exceeds the size of RAM.
+// So we specify GIGACAGE_ALLOCATION_CAN_FAIL = 1.
+#if BOS(LINUX)
+#undef GIGACAGE_ALLOCATION_CAN_FAIL
+#define GIGACAGE_ALLOCATION_CAN_FAIL 1
+#endif
+
static_assert(bmalloc::isPowerOfTwo(PRIMITIVE_GIGACAGE_SIZE), "");
static_assert(bmalloc::isPowerOfTwo(JSVALUE_GIGACAGE_SIZE), "");
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes