summaryrefslogtreecommitdiff
path: root/runtime/ops/os/mod.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2024-11-15 09:33:03 +0000
committerGitHub <noreply@github.com>2024-11-15 10:33:03 +0100
commitc9baf3849fdbe161a9251a712a71e2b91eeabf3e (patch)
tree61d082720160d928e303b4e1ae4816d3f228894a /runtime/ops/os/mod.rs
parentdcc75d5685ddb1ad3c1b97721cbc24bf6fa56c76 (diff)
perf: use available system memory for v8 isolate memory limit (#26868)
Instead of using the default 1.4Gb limit (which was meant for browser tabs) configure V8 to set the heap limit to the amount of memory available in the system. Closes https://github.com/denoland/deno/issues/23424 Closes https://github.com/denoland/deno/issues/26435 Closes https://github.com/denoland/deno/issues/21226
Diffstat (limited to 'runtime/ops/os/mod.rs')
-rw-r--r--runtime/ops/os/mod.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/runtime/ops/os/mod.rs b/runtime/ops/os/mod.rs
index b10a2939e..74c708c53 100644
--- a/runtime/ops/os/mod.rs
+++ b/runtime/ops/os/mod.rs
@@ -1,5 +1,6 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
+use crate::sys_info;
use crate::worker::ExitCode;
use deno_core::op2;
use deno_core::v8;
@@ -11,8 +12,6 @@ use serde::Serialize;
use std::collections::HashMap;
use std::env;
-mod sys_info;
-
deno_core::extension!(
deno_os,
ops = [