The Wayback Machine - https://web.archive.org/web/20220411225515/https://github.com/RustPython/RustPython/issues/3504
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak ? #3504

Open
5aitama opened this issue Dec 14, 2021 · 1 comment
Open

Memory leak ? #3504

5aitama opened this issue Dec 14, 2021 · 1 comment

Comments

@5aitama
Copy link

@5aitama 5aitama commented Dec 14, 2021

When I run the code below, the memory growth infinitely. Am I using it wrong ?

fn main() {
    loop {
        rustpython_vm::Interpreter::default()
        .enter(|vm| {
            let scope = vm.new_scope_with_builtins();
            let src = r#"print("Hello world")"#;
            let compiled = vm.compile(
                src, 
                rustpython_vm::compile::Mode::Exec, "<embedded>".to_owned()
            ).unwrap();
            vm.run_code_obj(compiled, scope).unwrap()
        });
    }
}

image

  • Running on a MacBook Air M1, 2020
  • OS used : macOS Monterey (v12.0.1)
  • Rust version : 1.57.0 (f1edd0429 2021-11-29)
  • Cargo version : 1.57.0 (b2e52d7ca 2021-10-21)
@fanninpm
Copy link
Contributor

@fanninpm fanninpm commented Jan 17, 2022

It's (most likely) not you. I ran into the exact same problem trying to get the benchmarks to work. #2380 should give you a little more context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants