WebKit Bugzilla
Attachment 347946 Details for
Bug 188897
: [CMake] Add HAVE_MALLOC_TRIM definition
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188897.diff (text/plain), 3.30 KB, created by
Don Olmstead
on 2018-08-23 12:09:36 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Don Olmstead
Created:
2018-08-23 12:09:36 PDT
Size:
3.30 KB
patch
obsolete
>diff --git a/ChangeLog b/ChangeLog >index ee4c9372605..fa6b661ec8a 100644 >--- a/ChangeLog >+++ b/ChangeLog >@@ -1,3 +1,14 @@ >+2018-08-23 Don Olmstead <don.olmstead@sony.com> >+ >+ [CMake] Add HAVE_MALLOC_TRIM definition >+ https://bugs.webkit.org/show_bug.cgi?id=188897 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add CMake check for malloc_trim. >+ >+ * Source/cmake/OptionsCommon.cmake: >+ > 2018-08-22 Ross Kirsling <ross.kirsling@sony.com> > > [MSVC] Stop disabling /O2 features. >diff --git a/PerformanceTests/CMakeLists.txt b/PerformanceTests/CMakeLists.txt >index cf60b948de5..0657f47968d 100644 >--- a/PerformanceTests/CMakeLists.txt >+++ b/PerformanceTests/CMakeLists.txt >@@ -1,4 +1,5 @@ >-if (NOT USE_SYSTEM_MALLOC) >+# MallocBench requires malloc_trim for non-Apple platforms >+if (NOT USE_SYSTEM_MALLOC AND (APPLE OR HAVE_MALLOC_TRIM)) > add_subdirectory(MallocBench) > endif () > >diff --git a/PerformanceTests/ChangeLog b/PerformanceTests/ChangeLog >index 3cb7b6bbc2d..a630381065d 100644 >--- a/PerformanceTests/ChangeLog >+++ b/PerformanceTests/ChangeLog >@@ -1,3 +1,15 @@ >+2018-08-23 Don Olmstead <don.olmstead@sony.com> >+ >+ [CMake] Add HAVE_MALLOC_TRIM definition >+ https://bugs.webkit.org/show_bug.cgi?id=188897 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ MallocBench should only be built on Apple platforms and platforms that >+ have malloc_trim. >+ >+ * CMakeLists.txt: >+ > 2018-08-13 Jon Lee <jonlee@apple.com> > > Update MotionMark version number >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index a30e24dbd59..cd81fc8b361 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,15 @@ >+2018-08-23 Don Olmstead <don.olmstead@sony.com> >+ >+ [CMake] Add HAVE_MALLOC_TRIM definition >+ https://bugs.webkit.org/show_bug.cgi?id=188897 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Use HAVE(MALLOC_TRIM) check instead of __GLIBC__. >+ >+ * wtf/linux/MemoryPressureHandlerLinux.cpp: >+ (WTF::MemoryPressureHandler::platformReleaseMemory): >+ > 2018-08-22 Don Olmstead <don.olmstead@sony.com> > > [WTF] Add generic implementation for Memory querying >diff --git a/Source/WTF/wtf/linux/MemoryPressureHandlerLinux.cpp b/Source/WTF/wtf/linux/MemoryPressureHandlerLinux.cpp >index f9fbe232cad..0c4def195af 100644 >--- a/Source/WTF/wtf/linux/MemoryPressureHandlerLinux.cpp >+++ b/Source/WTF/wtf/linux/MemoryPressureHandlerLinux.cpp >@@ -126,7 +126,7 @@ void MemoryPressureHandler::respondToMemoryPressure(Critical critical, Synchrono > > void MemoryPressureHandler::platformReleaseMemory(Critical) > { >-#ifdef __GLIBC__ >+#if HAVE(MALLOC_TRIM) > malloc_trim(0); > #endif > } >diff --git a/Source/cmake/OptionsCommon.cmake b/Source/cmake/OptionsCommon.cmake >index cd893d333c9..76303c39282 100644 >--- a/Source/cmake/OptionsCommon.cmake >+++ b/Source/cmake/OptionsCommon.cmake >@@ -127,6 +127,7 @@ WEBKIT_CHECK_HAVE_INCLUDE(HAVE_SYS_TIMEB_H sys/timeb.h) > WEBKIT_CHECK_HAVE_FUNCTION(HAVE_ALIGNED_MALLOC _aligned_malloc) > WEBKIT_CHECK_HAVE_FUNCTION(HAVE_ISDEBUGGERPRESENT IsDebuggerPresent) > WEBKIT_CHECK_HAVE_FUNCTION(HAVE_LOCALTIME_R localtime_r) >+WEBKIT_CHECK_HAVE_FUNCTION(HAVE_MALLOC_TRIM malloc_trim) > WEBKIT_CHECK_HAVE_FUNCTION(HAVE_STRNSTR strnstr) > WEBKIT_CHECK_HAVE_FUNCTION(HAVE_TIMEGM timegm) > WEBKIT_CHECK_HAVE_FUNCTION(HAVE_VASPRINTF vasprintf)
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 188897
: 347946