7 /*===========================================================================*
9 *===========================================================================*/
10 int vm_info_stats(struct vm_stats_info
*vsi
)
14 memset(&m
, 0, sizeof(m
));
15 m
.m_lsys_vm_info
.what
= VMIW_STATS
;
16 m
.m_lsys_vm_info
.ptr
= vsi
;
18 return _taskcall(VM_PROC_NR
, VM_INFO
, &m
);
21 /*===========================================================================*
23 *===========================================================================*/
24 int vm_info_usage(endpoint_t who
, struct vm_usage_info
*vui
)
28 memset(&m
, 0, sizeof(m
));
29 m
.m_lsys_vm_info
.what
= VMIW_USAGE
;
30 m
.m_lsys_vm_info
.ep
= who
;
31 m
.m_lsys_vm_info
.ptr
= vui
;
33 return _taskcall(VM_PROC_NR
, VM_INFO
, &m
);
36 /*===========================================================================*
38 *===========================================================================*/
39 int vm_info_region(endpoint_t who
, struct vm_region_info
*vri
,
40 int count
, vir_bytes
*next
)
45 memset(&m
, 0, sizeof(m
));
46 m
.m_lsys_vm_info
.what
= VMIW_REGION
;
47 m
.m_lsys_vm_info
.ep
= who
;
48 m
.m_lsys_vm_info
.count
= count
;
49 m
.m_lsys_vm_info
.ptr
= vri
;
50 m
.m_lsys_vm_info
.next
= *next
;
52 if ((result
= _taskcall(VM_PROC_NR
, VM_INFO
, &m
)) != OK
)
55 *next
= m
.m_lsys_vm_info
.next
;
56 return m
.m_lsys_vm_info
.count
;