diff --git a/src/platform_linux.cc b/src/platform_linux.cc index ecc11ec1..af711698 100644 --- a/src/platform_linux.cc +++ b/src/platform_linux.cc @@ -5,7 +5,6 @@ #include -#include #include #include #include @@ -39,6 +38,10 @@ #include #endif +#if defined(__linux__) +#include +#endif + struct PlatformMutexLinux : public PlatformMutex { sem_t* sem_ = nullptr; @@ -259,7 +262,9 @@ std::vector GetPlatformClangArguments() { #undef CHECKED void FreeUnusedMemory() { +#if defined(__linux__) malloc_trim(0); +#endif } #endif