There are a few places in both the interpreter and the additional Miri runtime where we accumulate state and never release it.
For example, this program uses more memory over time:
fn main() {
for _ in 0..1_000_000 {}
}
(I like this program because it seems comically simple but of course ranges are quite complicated without any optimization)
There are a few sources of this memory growth. I'm going to try to fix or reduce as many as possible. In most cases the growth is manageable but I have a real world case someone showed me where we hit ~10 GB in just a few minutes due to these issues.
The trickiest thing about these is that so far it looks like fixing these problems does not make Miri any faster or slower, and we don't have peak memory benchmarks. And hyperfine doesn't support them.
There are a few places in both the interpreter and the additional Miri runtime where we accumulate state and never release it.
For example, this program uses more memory over time:
(I like this program because it seems comically simple but of course ranges are quite complicated without any optimization)
There are a few sources of this memory growth. I'm going to try to fix or reduce as many as possible. In most cases the growth is manageable but I have a real world case someone showed me where we hit ~10 GB in just a few minutes due to these issues.
The trickiest thing about these is that so far it looks like fixing these problems does not make Miri any faster or slower, and we don't have peak memory benchmarks. And hyperfine doesn't support them.