-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
libuv/libuv
#3721Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.libuvIssues and PRs related to the libuv dependency or the uv binding.Issues and PRs related to the libuv dependency or the uv binding.
Description
Version
18.7.0
Platform
macOS 12.5.1(Darwin Kernel Version 21.6.0: Wed Aug 10 14:25:27 PDT 2022; root:xnu-8020.141.5~2/RELEASE_X86_64)Debian GNU/Linux 11 (bullseye)
Subsystem
No response
What steps will reproduce the bug?
Simply run the following command on both platform.
$ node -e "console.log('rss', process.memoryUsage.rss(), '; max rss', process.resourceUsage().maxRSS)"How often does it reproduce? Is there a required condition?
Always. No required condition.
What is the expected behavior?
According to the process.resourceUsage() document, maxRSS should have "maximum resident set size used in kilobytes".
What do you see instead?
On Linux (tag: 18.7.0-slim):
$ docker run --rm node:18.7.0-slim node -e "console.log('rss', process.memoryUsage.rss(), '; max rss', process.resourceUsage().maxRSS)"
rss 40235008 ; max rss 39292On the other hand, macOS host:
$ node -v
v18.7.0
$ node -e "console.log('rss', process.memoryUsage.rss(), '; max rss', process.resourceUsage().maxRSS)"
rss 32104448 ; max rss 32108544It looks like on Linux it reports correctly in kilobytes; but on macOS, it seems to be just bytes.
Additional information
N/A
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.libuvIssues and PRs related to the libuv dependency or the uv binding.Issues and PRs related to the libuv dependency or the uv binding.