malloc_trim is glibc specific
This commit is contained in:
@@ -2439,11 +2439,10 @@ void CWallet::DeleteTransactions(std::vector<uint256> &removeTxs) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if defined(__unix__) || defined(_WIN64)
|
#if defined(__GLIBC__)
|
||||||
// Miodrag: release memory back to the OS
|
|
||||||
malloc_trim(0);
|
malloc_trim(0);
|
||||||
#else
|
#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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user