1
0
mirror of https://github.com/shirou/gopsutil.git synced 2025-04-26 13:48:59 +08:00

Use uint64 when retrieving vfs.bufspace

On some system using a the uint32 function would return the error
"cannot allocate memory".
This commit is contained in:
Daniel Nelson 2018-04-12 15:33:51 -07:00
parent cd915bdc31
commit 28b1d7477e
No known key found for this signature in database
GPG Key ID: CAAD59C9444F6155

View File

@ -39,7 +39,7 @@ func VirtualMemoryWithContext(ctx context.Context) (*VirtualMemoryStat, error) {
if err != nil {
return nil, err
}
buffers, err := unix.SysctlUint32("vfs.bufspace")
buffers, err := unix.SysctlUint64("vfs.bufspace")
if err != nil {
return nil, err
}