Skip to content

Commit 0a8274d

Browse files
Include remaining memory in memory usage stats
1 parent 25201b2 commit 0a8274d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/rust-analyzer/src/handlers.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ pub(crate) fn handle_analyzer_status(
8484

8585
pub(crate) fn handle_memory_usage(state: &mut GlobalState, _: ()) -> Result<String> {
8686
let _p = profile::span("handle_memory_usage");
87-
let mem = state.analysis_host.per_query_memory_usage();
87+
let mut mem = state.analysis_host.per_query_memory_usage();
88+
mem.push(("Remaining".into(), profile::memory_usage().allocated));
8889

8990
let mut out = String::new();
9091
for (name, bytes) in mem {

0 commit comments

Comments
 (0)