summaryrefslogtreecommitdiff
path: root/sys-process/top-apple/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-process/top-apple/files
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-process/top-apple/files')
-rw-r--r--sys-process/top-apple/files/top-apple-73-darwin9.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/sys-process/top-apple/files/top-apple-73-darwin9.patch b/sys-process/top-apple/files/top-apple-73-darwin9.patch
new file mode 100644
index 000000000000..63d37c58f30b
--- /dev/null
+++ b/sys-process/top-apple/files/top-apple-73-darwin9.patch
@@ -0,0 +1,40 @@
+--- libtop.c.orig 2012-05-03 14:35:48.000000000 +0200
++++ libtop.c 2012-05-03 14:41:36.000000000 +0200
+@@ -23,6 +23,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <limits.h>
++#include <inttypes.h>
+ #include <sys/types.h>
+ #include <mach/bootstrap.h>
+ #include <mach/host_priv.h>
+@@ -1458,6 +1459,7 @@
+ libtop_pinfo_update_kernmem_info(task_t task, libtop_pinfo_t* pinfo) {
+ kern_return_t kr;
+
++#ifdef TASK_KERNELMEMORY_INFO_COUNT
+ mach_msg_type_number_t count = TASK_KERNELMEMORY_INFO_COUNT;
+
+ pinfo->psamp.p_palloc = pinfo->psamp.palloc;
+@@ -1466,6 +1468,9 @@
+ pinfo->psamp.p_sfree = pinfo->psamp.sfree;
+
+ kr = task_info(task, TASK_KERNELMEMORY_INFO, (task_info_t)&pinfo->psamp.palloc, &count);
++#else
++ memset(&pinfo->psamp.palloc, 0, sizeof(pinfo->psamp.palloc));
++#endif
+ return kr;
+ }
+
+@@ -1630,9 +1635,11 @@
+ }
+
+ 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_PRIVATE:
+ rprvt += info.private_pages_resident * pagesize;
+ rprvt += info.shared_pages_resident * pagesize;