Do not use malloc_trim on BSd
This commit is contained in:
parent
fe33d765e5
commit
79ff2e46d0
2 changed files with 8 additions and 0 deletions
|
@ -17,7 +17,9 @@
|
|||
#include "geventloop.h"
|
||||
|
||||
// #include "valgrind/memcheck.h"
|
||||
#ifndef BSD
|
||||
#include "malloc.h"
|
||||
#endif
|
||||
#include <algorithm>
|
||||
#include "errno.h"
|
||||
#include <boost/make_shared.hpp>
|
||||
|
@ -364,8 +366,10 @@ class SpectrumNetworkPlugin : public NetworkPlugin {
|
|||
|
||||
purple_accounts_delete_wrapped(account);
|
||||
#ifndef WIN32
|
||||
#ifndef BSD
|
||||
malloc_trim(0);
|
||||
#endif
|
||||
#endif
|
||||
// VALGRIND_DO_LEAK_CHECK;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,9 @@
|
|||
#include "Swiften/Swiften.h"
|
||||
#include "Swiften/Server/ServerStanzaChannel.h"
|
||||
#include "Swiften/Elements/StreamError.h"
|
||||
#ifndef BSD
|
||||
#include "malloc.h"
|
||||
#endif
|
||||
// #include "valgrind/memcheck.h"
|
||||
|
||||
namespace Transport {
|
||||
|
@ -124,8 +126,10 @@ void UserManager::removeUser(User *user, bool onUserBehalf) {
|
|||
onUserDestroyed(user);
|
||||
delete user;
|
||||
#ifndef WIN32
|
||||
#ifndef BSD
|
||||
malloc_trim(0);
|
||||
#endif
|
||||
#endif
|
||||
// VALGRIND_DO_LEAK_CHECK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue