Turn glibtop::machine from a value to a pointer, allocated on init.

This hides the glibtop_machine implementation.
This commit is contained in:
Benoit Dejean
2015-07-21 21:25:44 +02:00
committed by Benoît Dejean
parent 42e860e5ad
commit 0642c2d610
18 changed files with 55 additions and 45 deletions

View File

@@ -80,7 +80,7 @@ glibtop_get_proc_kernel_p (glibtop *server,
glibtop_suid_enter (server);
/* Get the process information */
pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid, &count);
pinfo = kvm_getprocs (server->machine->kd, KERN_PROC_PID, pid, &count);
if ((pinfo == NULL) || (count != 1)) {
glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
glibtop_suid_leave (server);