Skip to content

Commit f72cdb1

Browse files
author
Jonas Schievink
authored
No GC in Rust
1 parent a0c3e29 commit f72cdb1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

blog/_posts/2020-12-04-measuring-memory-usage-in-rust.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ If the problem is that, in a steady state, the application uses to much memory,
3333
In rust-analyzer, we are generally interested in keeping the overall memory usage small, and can make better use of heap parsing approach.
3434
Specifically, most of the rust-analyzer's data is stored in the incremental computation tables, and we want to know which table is the heaviest.
3535

36-
Unfortunately, Rust use garbage collection, so just parsing the heap bytes at runtime is impossible.
36+
Unfortunately, Rust does not use garbage collection, so just parsing the heap bytes at runtime is impossible.
3737
The best available alternative is instrumenting data structures for the purposes of measuring memory size.
3838
That is, writing a proc-macro which adds `fn total_size(&self) -> usize` method to annotated types, and calling that manually from the root of the data.
3939
There is Servo's https://github.com/servo/servo/tree/2d3811c21bf1c02911d5002f9670349c5cf4f500/components/malloc_size_of[`malloc_size_of`] crate for doing that, but it is not published to crates.io.

0 commit comments

Comments
 (0)