Skip to content
Commit 3dbe471a authored by Sam McCall's avatar Sam McCall
Browse files

[clangd] Use atomics instead of locks to track periodic memory trimming

Instead of always locking/unlocking a contended mutex, we now do one atomic read
in the common case, and one read + one exchange if the timer has expried.

Also use this for memory profiling which has similar/compatible requirements.

Differential Revision: https://reviews.llvm.org/D93726
parent f6929c01
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment