Skip to content

Commit

Permalink
flake: Add valgrind to the devShell
Browse files Browse the repository at this point in the history
valgrind is useful for the DHAT heap analysis tool - allowing you to
inspect heap interaction at runtime. For example you can compile one
of the example programs:

    cargo run --release --example check hello

and then run it while analyzing the heap interaction:

    valgrind --tool=dhat ./target/release/examples/check hello

And the result is a report on the heap usage. You can load it into
your browser to poke around the allocations and see what specifically
is taking a lot of memory.
  • Loading branch information
the-mikedavis committed Nov 3, 2024
1 parent 2af9bc0 commit cb41efb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
rust-analyzer
cargo-flamegraph
cargo-llvm-cov
valgrind
];
RUST_BACKTRACE = "1";
}
Expand Down

0 comments on commit cb41efb

Please sign in to comment.