From e9ecfdd20ac3f8a9d920bbcc4e5dd25bd262b4b7 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Sat, 17 Dec 2022 17:25:51 -0500 Subject: fix(runtime): `Deno.memoryUsage().rss` should return correct value (#17088) This commit changes implementation of "Deno.memoryUsage()" to return correct value for "rss" field. To do that we implement a specialized function per os to retrieve this information. --- runtime/js/90_deno_ns.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/js') diff --git a/runtime/js/90_deno_ns.js b/runtime/js/90_deno_ns.js index e3ccf1b6f..94a611456 100644 --- a/runtime/js/90_deno_ns.js +++ b/runtime/js/90_deno_ns.js @@ -29,7 +29,7 @@ makeTempDir: __bootstrap.fs.makeTempDir, makeTempFileSync: __bootstrap.fs.makeTempFileSync, makeTempFile: __bootstrap.fs.makeTempFile, - memoryUsage: core.memoryUsage, + memoryUsage: () => core.ops.op_runtime_memory_usage(), mkdirSync: __bootstrap.fs.mkdirSync, mkdir: __bootstrap.fs.mkdir, chdir: __bootstrap.fs.chdir, -- cgit v1.2.3