From c1b4ff61c9113166705526022452ed2fb00bc7d5 Mon Sep 17 00:00:00 2001 From: Akshat Agarwal Date: Thu, 10 Sep 2020 14:08:17 +0530 Subject: feat(unstable): Add Deno.systemMemoryInfo() (#7350) Co-authored-by: marcopacini Co-authored-by: Casper Beyer --- cli/rt/30_os.js | 5 +++++ cli/rt/90_deno_ns.js | 1 + 2 files changed, 6 insertions(+) (limited to 'cli/rt') diff --git a/cli/rt/30_os.js b/cli/rt/30_os.js index 743ecd585..adf256fc6 100644 --- a/cli/rt/30_os.js +++ b/cli/rt/30_os.js @@ -15,6 +15,10 @@ return sendSync("op_os_release"); } + function systemMemoryInfo() { + return sendSync("op_system_memory_info"); + } + function exit(code = 0) { sendSync("op_exit", { code }); throw new Error("Code not reachable"); @@ -50,6 +54,7 @@ execPath, exit, osRelease, + systemMemoryInfo, hostname, loadavg, }; diff --git a/cli/rt/90_deno_ns.js b/cli/rt/90_deno_ns.js index 82acdef3c..23ab12924 100644 --- a/cli/rt/90_deno_ns.js +++ b/cli/rt/90_deno_ns.js @@ -103,6 +103,7 @@ __bootstrap.denoNsUnstable = { loadavg: __bootstrap.os.loadavg, hostname: __bootstrap.os.hostname, osRelease: __bootstrap.os.osRelease, + systemMemoryInfo: __bootstrap.os.systemMemoryInfo, applySourceMap: __bootstrap.errorStack.opApplySourceMap, formatDiagnostics: __bootstrap.errorStack.opFormatDiagnostics, shutdown: __bootstrap.net.shutdown, -- cgit v1.2.3