[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
Loading
Please sign in to comment