[PATCH] D93452: [clangd] Trim memory after buildINdex

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 17 06:40:32 PST 2020


njames93 added a comment.

`malloc_trim` isn't available on windows so this wont work, so this should likely be ifdef'd out on windows builds. Side note is this memory failing to free behaviour observed on windows?



================
Comment at: clang-tools-extra/clangd/index/FileIndex.cpp:51
+void trimMemory() {
+  if (malloc_trim(0))
+    vlog("Trimmed memory");
----------------
It may be helpful to log how many times this call fails to free any memory.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93452/new/

https://reviews.llvm.org/D93452



More information about the cfe-commits mailing list