1
0
mirror of https://github.com/libuv/libuv synced 2025-03-28 21:13:16 +00:00

unix: fix uv_getrusage ru_maxrss on solaris (#4572)

This commit is contained in:
Poul T Lomholt 2024-10-10 08:04:11 -07:00 committed by GitHub
parent 1f36b01ed0
commit 7c3abfbf1e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1034,7 +1034,7 @@ int uv_getrusage(uv_rusage_t* rusage) {
#if defined(__APPLE__) #if defined(__APPLE__)
rusage->ru_maxrss /= 1024; /* macOS and iOS report bytes. */ rusage->ru_maxrss /= 1024; /* macOS and iOS report bytes. */
#elif defined(__sun) #elif defined(__sun)
rusage->ru_maxrss /= getpagesize() / 1024; /* Solaris reports pages. */ rusage->ru_maxrss *= getpagesize() / 1024; /* Solaris reports pages. */
#endif #endif
return 0; return 0;