diff options
author | Oleksii Shevchuk <alxchk@gmail.com> | 2017-05-20 23:50:46 +0400 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2017-05-20 21:50:46 +0200 |
commit | a92cfcd574e876189b64449c8e1eea505768a83e (patch) | |
tree | f152d045a326cef9b3a383b0e2c5e63a2f622910 | |
parent | d3fde86f8432f67caf360f90ab28016d7a1a430a (diff) | |
download | psutil-a92cfcd574e876189b64449c8e1eea505768a83e.tar.gz |
SunOS: Fix .memory_maps(grouped=False) (#1093)
-rw-r--r-- | CREDITS | 2 | ||||
-rw-r--r-- | HISTORY.rst | 1 | ||||
-rw-r--r-- | psutil/_psutil_sunos.c | 12 |
3 files changed, 8 insertions, 7 deletions
@@ -482,4 +482,4 @@ I: 1042, 1079 N: Oleksii Shevchuk W: https://github.com/alxchk -I: 1077 +I: 1077, 1093 diff --git a/HISTORY.rst b/HISTORY.rst index bb20811a..95371d82 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -27,6 +27,7 @@ **Bug fixes** +- 1093_: [SunOS] memory_maps() shows wrong 64 bit addresses - 1007_: [Windows] boot_time() can have a 1 sec fluctuation between calls; the value of the first call is now cached so that boot_time() always returns the same value if fluctuation is <= 1 second. diff --git a/psutil/_psutil_sunos.c b/psutil/_psutil_sunos.c index 785805d4..fcfbd1ac 100644 --- a/psutil/_psutil_sunos.c +++ b/psutil/_psutil_sunos.c @@ -791,14 +791,14 @@ psutil_proc_memory_maps(PyObject *self, PyObject *args) { if (! py_path) goto error; py_tuple = Py_BuildValue( - "iisOlll", - p->pr_vaddr, - pr_addr_sz, + "kksOkkk", + (unsigned long)p->pr_vaddr, + (unsigned long)pr_addr_sz, perms, py_path, - (long)p->pr_rss * p->pr_pagesize, - (long)p->pr_anon * p->pr_pagesize, - (long)p->pr_locked * p->pr_pagesize); + (unsigned long)p->pr_rss * p->pr_pagesize, + (unsigned long)p->pr_anon * p->pr_pagesize, + (unsigned long)p->pr_locked * p->pr_pagesize); if (!py_tuple) goto error; if (PyList_Append(py_retlist, py_tuple)) |