From 707d50e89496b4517a5293eceda54b22e09950f7 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sun, 15 Mar 2020 15:18:00 -0400 Subject: [PATCH] Only malloc_trim on unix+windows --- src/wallet/wallet.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 2fb192e1e..20e137dc7 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2951,8 +2951,12 @@ void CWallet::DeleteTransactions(std::vector &removeTxs) { return; } } - // Miodrag: release memory back to the OS +#if defined(__unix__) || defined(_WIN64) + // Miodrag: release memory back to the OS malloc_trim(0); +#else + //TODO: This doesn't work on Mac +#endif } void CWallet::DeleteWalletTransactions(const CBlockIndex* pindex) {