Skip to content

Commit

Permalink
int is too short to handle RSS of 64-bit NetBSD architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoon committed Aug 30, 2020
1 parent b681933 commit eb978e7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions phymem_netbsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ package phymem
#include <stdio.h>
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/types.h>
#include <unistd.h>
static int
static int64_t
getRSS(void)
{
int ret;
Expand All @@ -23,7 +24,7 @@ getRSS(void)
long pagesize = sysconf(_SC_PAGESIZE);
return kp.p_vm_rssize * pagesize;
return (int64_t)(kp.p_vm_rssize * pagesize);
}
*/
import "C"
Expand Down

0 comments on commit eb978e7

Please sign in to comment.