summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2016-01-13 21:32:43 -0200
committerHisham Muhammad <hisham@gobolinux.org>2016-01-13 21:32:43 -0200
commit195f5edbc8dd79267fa23feb5fda2a8be812abeb (patch)
tree780b36554211020d468fce6c92c3c53d51776e93
parent9c39422c716581a9cbdcd15eb9ad616c6bf6e746 (diff)
parentd3125102234537f63832f194466578bd4ca6d371 (diff)
Merge pull request #347 from mklein-de/darwin32+64
Darwin: replace vm_statistics64_* with vm_statistics_*
-rw-r--r--darwin/DarwinProcessList.c8
-rw-r--r--darwin/DarwinProcessList.h4
-rw-r--r--darwin/Platform.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/darwin/DarwinProcessList.c b/darwin/DarwinProcessList.c
index 624db981..deafc5f3 100644
--- a/darwin/DarwinProcessList.c
+++ b/darwin/DarwinProcessList.c
@@ -28,7 +28,7 @@ typedef struct DarwinProcessList_ {
ProcessList super;
host_basic_info_data_t host_info;
- vm_statistics64_data_t vm_stats;
+ vm_statistics_data_t vm_stats;
processor_cpu_load_info_t prev_load;
processor_cpu_load_info_t curr_load;
uint64_t kernel_threads;
@@ -68,10 +68,10 @@ unsigned ProcessList_allocateCPULoadInfo(processor_cpu_load_info_t *p) {
return cpu_count;
}
-void ProcessList_getVMStats(vm_statistics64_t p) {
- mach_msg_type_number_t info_size = HOST_VM_INFO64_COUNT;
+void ProcessList_getVMStats(vm_statistics_t p) {
+ mach_msg_type_number_t info_size = HOST_VM_INFO_COUNT;
- if (host_statistics64(mach_host_self(), HOST_VM_INFO64, (host_info_t)p, &info_size) != 0)
+ if (host_statistics(mach_host_self(), HOST_VM_INFO, (host_info_t)p, &info_size) != 0)
CRT_fatalError("Unable to retrieve VM statistics\n");
}
diff --git a/darwin/DarwinProcessList.h b/darwin/DarwinProcessList.h
index 8b4b985a..c216a804 100644
--- a/darwin/DarwinProcessList.h
+++ b/darwin/DarwinProcessList.h
@@ -17,7 +17,7 @@ typedef struct DarwinProcessList_ {
ProcessList super;
host_basic_info_data_t host_info;
- vm_statistics64_data_t vm_stats;
+ vm_statistics_data_t vm_stats;
processor_cpu_load_info_t prev_load;
processor_cpu_load_info_t curr_load;
uint64_t kernel_threads;
@@ -32,7 +32,7 @@ void ProcessList_freeCPULoadInfo(processor_cpu_load_info_t *p);
unsigned ProcessList_allocateCPULoadInfo(processor_cpu_load_info_t *p);
-void ProcessList_getVMStats(vm_statistics64_t p);
+void ProcessList_getVMStats(vm_statistics_t p);
struct kinfo_proc *ProcessList_getKInfoProcs(size_t *count);
diff --git a/darwin/Platform.c b/darwin/Platform.c
index c025509f..80899064 100644
--- a/darwin/Platform.c
+++ b/darwin/Platform.c
@@ -218,7 +218,7 @@ double Platform_setCPUValues(Meter* mtr, int cpu) {
void Platform_setMemoryValues(Meter* mtr) {
DarwinProcessList *dpl = (DarwinProcessList *)mtr->pl;
- vm_statistics64_t vm = &dpl->vm_stats;
+ vm_statistics_t vm = &dpl->vm_stats;
double page_K = (double)vm_page_size / (double)1024;
mtr->total = dpl->host_info.max_mem / 1024;

© 2014-2024 Faster IT GmbH | imprint | privacy policy