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

UnboundScript - create_code_cache() leaks memory #779

Open
dsherret opened this issue Jun 8, 2024 · 1 comment
Open

UnboundScript - create_code_cache() leaks memory #779

dsherret opened this issue Jun 8, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@dsherret
Copy link
Member

dsherret commented Jun 8, 2024

Run and close a worker in a loop and you'll see this happening.

image

image

https://github.com/v8/v8/blob/cbc1b57b90ba1db080f0a045adcefce04c1f21e5/src/snapshot/code-serializer.cc#L669

@dsherret dsherret added the bug Something isn't working label Jun 10, 2024
@JacobZwang
Copy link

Is this why creating new JsRuntimes leaks memory? Is there a solution to this? Here's a simple example that steadily increases memory usage over time.

use deno_core::{JsRuntime, RuntimeOptions};

fn main() {
    for i in 0..1000 {
        let _js_runtime = JsRuntime::new(RuntimeOptions {
            ..Default::default()
        });
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants