diff --git a/backends/libpurple/main.cpp b/backends/libpurple/main.cpp index 585be7cc697229299d3a4752727935c9614bc5b0..1658aecf9a13c7d98176f45b4f96c4740a18582e 100644 --- a/backends/libpurple/main.cpp +++ b/backends/libpurple/main.cpp @@ -482,7 +482,7 @@ class SpectrumNetworkPlugin : public NetworkPlugin { purple_accounts_delete_wrapped(account); #ifndef WIN32 -#if !defined(__FreeBSD__) && !defined(__APPLE__) +#if !defined(__FreeBSD__) && !defined(__APPLE__) && defined (__GLIBC__) malloc_trim(0); #endif #endif @@ -2111,7 +2111,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 -#if !defined(__FreeBSD__) && !defined(__APPLE__) +#if !defined(__FreeBSD__) && !defined(__APPLE__) && defined (__GLIBC__) // force returning of memory chunks allocated by libxml2 to kernel malloc_trim(0); #endif @@ -2335,7 +2335,7 @@ int main(int argc, char **argv) { boost::locale::generator gen; std::locale::global(gen("")); #ifndef WIN32 -#if !defined(__FreeBSD__) && !defined(__APPLE__) +#if !defined(__FreeBSD__) && !defined(__APPLE__) && defined (__GLIBC__) mallopt(M_CHECK_ACTION, 2); mallopt(M_PERTURB, 0xb); #endif