From 5523d0f68f4b3cddaf15e46132f5e26558d41993 Mon Sep 17 00:00:00 2001 From: andreacavalli Date: Wed, 19 Aug 2020 15:38:39 +0200 Subject: [PATCH] Fixed support for windows --- td/telegram/Td.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/td/telegram/Td.cpp b/td/telegram/Td.cpp index 5a1209b85..5040941aa 100644 --- a/td/telegram/Td.cpp +++ b/td/telegram/Td.cpp @@ -5165,7 +5165,9 @@ void Td::on_request(uint64 id, td_api::optimizeStorage &request) { animations_manager_->memory_cleanup(); file_manager_->memory_cleanup(); - malloc_trim(0); + #ifdef __linux__ + malloc_trim(0); + #endif std::vector file_types; for (auto &file_type : request.file_types_) {