summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
diff options
context:
space:
mode:
authorQuentin Chateau <quentin.chateau@gmail.com>2020-12-22 08:44:20 +0100
committerSam McCall <sam.mccall@gmail.com>2020-12-22 08:54:28 +0100
commitb8c37153d5393aad96feefe0b4689b7b62bc160d (patch)
treeeb773741cc15d03f5b73196806d0e8906a65cafc /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
parentf72c384b5ba943c92fadcbe77f9d7661728905ab (diff)
[clangd] Trim memory periodically when using glibc malloc
This diff addresses the issue of the ever increasing memory usage of clangd. The key to understand what happens is to use `malloc_stats()`: malloc arenas keep getting bigger, although the actual memory used does not. It seems some operations while bulding the indices (both dynamic and background) create this problem. Specifically, 'FileSymbols::update' and 'FileSymbols::buildIndex' seem especially affected. This diff adds a call to `malloc_trim()` periodically in ClangdLSPServer. Fixes: https://github.com/clangd/clangd/issues/251 Fixes: https://github.com/clangd/clangd/issues/115 Reviewed By: sammccall Differential Revision: https://reviews.llvm.org/D93452
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
0 files changed, 0 insertions, 0 deletions