Fix MacOS build

This commit is contained in:
Jacob Dufault 2017-10-31 15:43:07 -07:00
parent 7734943620
commit f48f818f4c

View File

@ -5,7 +5,6 @@
#include <loguru.hpp>
#include <malloc.h>
#include <pthread.h>
#include <cassert>
#include <iostream>
@ -39,6 +38,10 @@
#include <sys/prctl.h>
#endif
#if defined(__linux__)
#include <malloc.h>
#endif
struct PlatformMutexLinux : public PlatformMutex {
sem_t* sem_ = nullptr;
@ -259,7 +262,9 @@ std::vector<std::string> GetPlatformClangArguments() {
#undef CHECKED
void FreeUnusedMemory() {
#if defined(__linux__)
malloc_trim(0);
#endif
}
#endif