diff --git a/backends/libpurple/main.cpp b/backends/libpurple/main.cpp index 182e21c2dad20260a1a1d828e6ff0cf73dec1a42..c5c85adb6d8b8da377921bd754d44b678631e3c0 100644 --- a/backends/libpurple/main.cpp +++ b/backends/libpurple/main.cpp @@ -17,7 +17,7 @@ #include "geventloop.h" // #include "valgrind/memcheck.h" -#ifndef __FreeBSD__ +#if !defined(__FreeBSD__) && !defined(__APPLE__) #include "malloc.h" #endif #include @@ -417,7 +417,7 @@ class SpectrumNetworkPlugin : public NetworkPlugin { purple_accounts_delete_wrapped(account); #ifndef WIN32 -#ifndef __FreeBSD__ +#if !defined(__FreeBSD__) && !defined(__APPLE__) malloc_trim(0); #endif #endif @@ -1583,7 +1583,7 @@ static void signed_on(PurpleConnection *gc, gpointer unused) { PurpleAccount *account = purple_connection_get_account_wrapped(gc); np->handleConnected(np->m_accounts[account]); #ifndef WIN32 -#ifndef __FreeBSD__ +#if !defined(__FreeBSD__) && !defined(__APPLE__) // force returning of memory chunks allocated by libxml2 to kernel malloc_trim(0); #endif @@ -1782,7 +1782,7 @@ static void transportDataReceived(gpointer data, gint source, PurpleInputConditi int main(int argc, char **argv) { #ifndef WIN32 -#ifndef __FreeBSD__ +#if !defined(__FreeBSD__) && !defined(__APPLE__) mallopt(M_CHECK_ACTION, 2); mallopt(M_PERTURB, 0xb); #endif