Skip to content

Commit

Permalink
unix: fix uv_getrusage ru_maxrss on solaris (libuv#4572)
Browse files Browse the repository at this point in the history
  • Loading branch information
ptlomholt authored Oct 10, 2024
1 parent 1f36b01 commit 7c3abfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/unix/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ int uv_getrusage(uv_rusage_t* rusage) {
#if defined(__APPLE__)
rusage->ru_maxrss /= 1024; /* macOS and iOS report bytes. */
#elif defined(__sun)
rusage->ru_maxrss /= getpagesize() / 1024; /* Solaris reports pages. */
rusage->ru_maxrss *= getpagesize() / 1024; /* Solaris reports pages. */
#endif

return 0;
Expand Down

0 comments on commit 7c3abfb

Please sign in to comment.