From 6600154f44d419459ee4396ab661c4f96eeefd3a Mon Sep 17 00:00:00 2001
From: feeiyu <158308373+feeiyu@users.noreply.github.com>
Date: Tue, 3 Feb 2026 21:37:54 +0800
Subject: [PATCH] Fix incorrect memory display in the language servers menu on
Linux (#48245)
While trying out the new feature introduced in #48226, I noticed an
issue on Linux where the reported memory usage is incorrect.
On Linux, even when using ProcessRefreshKind::nothing, thread
information is still collected. To fix this, the memory calculation
needs to explicitly exclude task/thread data by using without_tasks.
Before
After
Release Notes:
- N/A
---
crates/language_tools/src/lsp_button.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/crates/language_tools/src/lsp_button.rs b/crates/language_tools/src/lsp_button.rs
index 9dc97080c0c3f5bc28ff862851e9c95d687c48aa..77d58349a2b910aa58efeed7cbc8bdc840da3808 100644
--- a/crates/language_tools/src/lsp_button.rs
+++ b/crates/language_tools/src/lsp_button.rs
@@ -89,8 +89,8 @@ impl ProcessMemoryCache {
.unwrap_or(true);
if cache_expired {
- let refresh_kind =
- RefreshKind::nothing().with_processes(ProcessRefreshKind::nothing().with_memory());
+ let refresh_kind = RefreshKind::nothing()
+ .with_processes(ProcessRefreshKind::nothing().without_tasks().with_memory());
self.system.refresh_specifics(refresh_kind);
self.memory_usage.clear();
self.last_refresh = Some(Instant::now());