summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2016-03-04 18:49:18 +0100
committerGiampaolo Rodola <g.rodola@gmail.com>2016-03-04 18:49:18 +0100
commitc28b901f2f13ae9f2ae457918f0ffd307127bf4b (patch)
tree0bb6b84ab2b4ff5ba332cbd9b8a09a93ba666bce
parent1a35a18b010890929b3cc0a118ef0c57e561d463 (diff)
parent780d52ab3551c5c980356c304e429e8c94c39100 (diff)
downloadpsutil-c28b901f2f13ae9f2ae457918f0ffd307127bf4b.tar.gz
Merge branch 'master' of github.com:giampaolo/psutil
-rw-r--r--HISTORY.rst1
-rw-r--r--psutil/_psutil_osx.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/HISTORY.rst b/HISTORY.rst
index b8bdec10..56bcb486 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -19,6 +19,7 @@ Bug tracker at https://github.com/giampaolo/psutil/issues
- #780: [OSX] psutil does not compile with some gcc versions.
- #786: net_if_addrs() may report incomplete MAC addresses.
- #788: [NetBSD] virtual_memory()'s buffers and shared values were set to 0.
+- #790: [OSX] psutil won't compile on OSX 10.4.
4.0.0 - 2016-02-17
diff --git a/psutil/_psutil_osx.c b/psutil/_psutil_osx.c
index e9a898ac..12500dc8 100644
--- a/psutil/_psutil_osx.c
+++ b/psutil/_psutil_osx.c
@@ -366,9 +366,11 @@ psutil_proc_memory_maps(PyObject *self, PyObject *args) {
if (strlen(buf) == 0) {
switch (info.share_mode) {
+// #ifdef SM_LARGE_PAGE
// case SM_LARGE_PAGE:
// Treat SM_LARGE_PAGE the same as SM_PRIVATE
// since they are not shareable and are wired.
+// #endif
case SM_COW:
strcpy(buf, "[cow]");
break;
@@ -622,8 +624,10 @@ psutil_proc_memory_uss(PyObject *self, PyObject *args) {
}
switch (info.share_mode) {
+#ifdef SM_LARGE_PAGE
case SM_LARGE_PAGE:
// NB: Large pages are not shareable and always resident.
+#endif
case SM_PRIVATE:
private_pages += info.private_pages_resident;
private_pages += info.shared_pages_resident;