From 534efcb65d509dd9b9146a7f7402e41b52bdadb5 Mon Sep 17 00:00:00 2001 From: miodragpop Date: Fri, 17 Jul 2020 02:28:27 +0200 Subject: [PATCH] malloc_trim is glibc specific --- src/wallet/wallet.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index ae845cb21..3c7040b45 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2439,11 +2439,10 @@ void CWallet::DeleteTransactions(std::vector &removeTxs) { return; } } -#if defined(__unix__) || defined(_WIN64) - // Miodrag: release memory back to the OS +#if defined(__GLIBC__) malloc_trim(0); #else - //TODO: This doesn't work on Mac + // On Mac and Win memory isn't kept back upon vector or list member erase, different garbage collector strategy. No need to force trimming. #endif }