diff options
author | user <user@users-virtualbox.local> | 2016-03-03 05:43:03 +0100 |
---|---|---|
committer | user <user@users-virtualbox.local> | 2016-03-03 05:43:03 +0100 |
commit | 780d52ab3551c5c980356c304e429e8c94c39100 (patch) | |
tree | e91c0ced4339e28526f6a5231ac068b186c3b4a0 | |
parent | a2eec79f01b6df45fb0ec2e9c79d9300deaf3c10 (diff) | |
download | psutil-780d52ab3551c5c980356c304e429e8c94c39100.tar.gz |
fix #790: [OSX] psutil won't compile on OSX 10.4.
-rw-r--r-- | HISTORY.rst | 1 | ||||
-rw-r--r-- | psutil/_psutil_osx.c | 4 |
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; |