From ed30206271f7abb7f12a92e6b00054a6f0f32842 Mon Sep 17 00:00:00 2001 From: Brett Langdon Date: Mon, 7 Mar 2022 13:44:01 -0500 Subject: [PATCH] chore(vendor): fix psutil getpagesize() for newer macos (#3382) Newer versions of macos do not have `getpagesize()`, and instead `PAGE_SIZE` should be used. https://github.com/giampaolo/psutil/pull/1794 (cherry picked from commit d9b9ad8c6cc0dff4b1c0c2bb7e9076fae5ee985d) --- ddtrace/vendor/psutil/_psutil_osx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ddtrace/vendor/psutil/_psutil_osx.c b/ddtrace/vendor/psutil/_psutil_osx.c index 76ec0ee850a..67b7e122c5a 100644 --- a/ddtrace/vendor/psutil/_psutil_osx.c +++ b/ddtrace/vendor/psutil/_psutil_osx.c @@ -513,7 +513,7 @@ psutil_virtual_mem(PyObject *self, PyObject *args) { uint64_t total; size_t len = sizeof(total); vm_statistics_data_t vm; - int pagesize = getpagesize(); + int pagesize = PAGE_SIZE; // physical mem mib[0] = CTL_HW; mib[1] = HW_MEMSIZE; @@ -553,7 +553,7 @@ psutil_swap_mem(PyObject *self, PyObject *args) { size_t size; struct xsw_usage totals; vm_statistics_data_t vmstat; - int pagesize = getpagesize(); + int pagesize = PAGE_SIZE; mib[0] = CTL_VM; mib[1] = VM_SWAPUSAGE;