diff options
| author | Syohei YOSHIDA <syohex@gmail.com> | 2016-01-19 16:35:01 +0900 |
|---|---|---|
| committer | Syohei YOSHIDA <syohex@gmail.com> | 2016-01-19 16:35:01 +0900 |
| commit | a88c4a986d574e8d208df2cd11cc53bed6883894 (patch) | |
| tree | 86ac41008a4f5d3343518075c030c8024c87dbcb | |
| parent | 404c2b0229c853b3c1921d5c1dc6fccd7941d8c4 (diff) | |
| download | psutil-a88c4a986d574e8d208df2cd11cc53bed6883894.tar.gz | |
Correct data type for 'hw.physmem'
Its type is 'unsigned long', not 'unsigned int'. Passing wrong type
variable causes returning ENOMEM.
| -rw-r--r-- | psutil/arch/bsd/freebsd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/psutil/arch/bsd/freebsd.c b/psutil/arch/bsd/freebsd.c index 94a1001c..3b7fc478 100644 --- a/psutil/arch/bsd/freebsd.c +++ b/psutil/arch/bsd/freebsd.c @@ -473,7 +473,8 @@ error: */ PyObject * psutil_virtual_mem(PyObject *self, PyObject *args) { - unsigned int total, active, inactive, wired, cached, free; + unsigned long total; + unsigned int active, inactive, wired, cached, free; size_t size = sizeof(total); struct vmtotal vm; int mib[] = {CTL_VM, VM_METER}; |
