Title: [289671] trunk
- Revision
- 289671
- Author
- [email protected]
- Date
- 2022-02-11 14:46:36 -0800 (Fri, 11 Feb 2022)
Log Message
[CMake] Check for MAP_ALIGNED support
https://bugs.webkit.org/show_bug.cgi?id=236522
Reviewed by Keith Miller.
.:
Add a symbol check for MAP_ALIGNED in the CMake.
* Source/cmake/OptionsCommon.cmake:
Source/WTF:
Use the HAVE(MAP_ALIGNED) check in tryReserveUncommittedAligned. Mark unused parameters in
the function. Also define MAP_NORESERVE if its undefined which seems to be the case in
FreeBSD.
* wtf/posix/OSAllocatorPOSIX.cpp:
(WTF::OSAllocator::tryReserveUncommittedAligned):
Modified Paths
Diff
Modified: trunk/ChangeLog (289670 => 289671)
--- trunk/ChangeLog 2022-02-11 21:48:12 UTC (rev 289670)
+++ trunk/ChangeLog 2022-02-11 22:46:36 UTC (rev 289671)
@@ -1,3 +1,14 @@
+2022-02-11 Don Olmstead <[email protected]>
+
+ [CMake] Check for MAP_ALIGNED support
+ https://bugs.webkit.org/show_bug.cgi?id=236522
+
+ Reviewed by Keith Miller.
+
+ Add a symbol check for MAP_ALIGNED in the CMake.
+
+ * Source/cmake/OptionsCommon.cmake:
+
2022-02-11 Adrian Perez de Castro <[email protected]>
[CMake] Use ld.lld by default for development builds where available
Modified: trunk/Source/WTF/ChangeLog (289670 => 289671)
--- trunk/Source/WTF/ChangeLog 2022-02-11 21:48:12 UTC (rev 289670)
+++ trunk/Source/WTF/ChangeLog 2022-02-11 22:46:36 UTC (rev 289671)
@@ -1,3 +1,17 @@
+2022-02-11 Don Olmstead <[email protected]>
+
+ [CMake] Check for MAP_ALIGNED support
+ https://bugs.webkit.org/show_bug.cgi?id=236522
+
+ Reviewed by Keith Miller.
+
+ Use the HAVE(MAP_ALIGNED) check in tryReserveUncommittedAligned. Mark unused parameters in
+ the function. Also define MAP_NORESERVE if its undefined which seems to be the case in
+ FreeBSD.
+
+ * wtf/posix/OSAllocatorPOSIX.cpp:
+ (WTF::OSAllocator::tryReserveUncommittedAligned):
+
2022-02-11 Elliott Williams <[email protected]>
Fix headers in install builds and add untracked headers
Modified: trunk/Source/WTF/wtf/posix/OSAllocatorPOSIX.cpp (289670 => 289671)
--- trunk/Source/WTF/wtf/posix/OSAllocatorPOSIX.cpp 2022-02-11 21:48:12 UTC (rev 289670)
+++ trunk/Source/WTF/wtf/posix/OSAllocatorPOSIX.cpp 2022-02-11 22:46:36 UTC (rev 289671)
@@ -178,8 +178,15 @@
return aligned;
#else
-#ifdef MAP_ALIGNED
-
+#if HAVE(MAP_ALIGNED)
+#ifndef MAP_NORESERVE
+#define MAP_NORESERVE 0
+#endif
+ UNUSED_PARAM(usage);
+ UNUSED_PARAM(writable);
+ UNUSED_PARAM(executable);
+ UNUSED_PARAM(jitCageEnabled);
+ UNUSED_PARAM(includesGuardPages);
void* result = mmap(0, bytes, PROT_NONE, MAP_NORESERVE | MAP_PRIVATE | MAP_ANON | MAP_ALIGNED(getLSBSet(alignment)), -1, 0);
if (result == MAP_FAILED)
return nullptr;
@@ -205,7 +212,7 @@
releaseDecommitted(alignedEnd, rightExtra);
return aligned;
-#endif // MAP_ALIGNED
+#endif // HAVE(MAP_ALIGNED)
#endif // PLATFORM(MAC) || USE(APPLE_INTERNAL_SDK)
}
Modified: trunk/Source/cmake/OptionsCommon.cmake (289670 => 289671)
--- trunk/Source/cmake/OptionsCommon.cmake 2022-02-11 21:48:12 UTC (rev 289670)
+++ trunk/Source/cmake/OptionsCommon.cmake 2022-02-11 22:46:36 UTC (rev 289671)
@@ -208,6 +208,7 @@
if (NOT (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin"))
WEBKIT_CHECK_HAVE_SYMBOL(HAVE_PTHREAD_MAIN_NP pthread_main_np pthread_np.h)
endif ()
+WEBKIT_CHECK_HAVE_SYMBOL(HAVE_MAP_ALIGNED MAP_ALIGNED sys/mman.h)
WEBKIT_CHECK_HAVE_SYMBOL(HAVE_SHM_ANON SHM_ANON sys/mman.h)
WEBKIT_CHECK_HAVE_SYMBOL(HAVE_TIMINGSAFE_BCMP timingsafe_bcmp string.h)
# Windows has signal.h but is missing symbols that are used in calls to signal.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes