File tree Expand file tree Collapse file tree 3 files changed +28
-0
lines changed
src/unix/bsd/freebsdlike/freebsd Expand file tree Collapse file tree 3 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -1865,6 +1865,7 @@ fn test_freebsd(target: &str) {
1865
1865
"sys/user.h" ,
1866
1866
"sys/utsname.h" ,
1867
1867
"sys/uuid.h" ,
1868
+ "sys/vmmeter.h" ,
1868
1869
"sys/wait.h" ,
1869
1870
"libprocstat.h" ,
1870
1871
"syslog.h" ,
@@ -2053,6 +2054,8 @@ fn test_freebsd(target: &str) {
2053
2054
// Added in in FreeBSD 13.0 (r367776 and r367287)
2054
2055
"SCM_CREDS2" | "LOCAL_CREDS_PERSISTENT" if Some ( 13 ) > freebsd_ver => true ,
2055
2056
2057
+ "VM_TOTAL" if Some ( 11 ) == freebsd_ver => true ,
2058
+
2056
2059
_ => false ,
2057
2060
}
2058
2061
} ) ;
@@ -2084,6 +2087,9 @@ fn test_freebsd(target: &str) {
2084
2087
// `ptrace_sc_ret` is not available in FreeBSD 11
2085
2088
"ptrace_sc_ret" if Some ( 11 ) == freebsd_ver => true ,
2086
2089
2090
+ // obsolete version
2091
+ "vmtotal" if Some ( 11 ) == freebsd_ver => true ,
2092
+
2087
2093
_ => false ,
2088
2094
}
2089
2095
} ) ;
Original file line number Diff line number Diff line change @@ -1249,6 +1249,7 @@ VDISCARD
1249
1249
VDSUSP
1250
1250
VERASE2
1251
1251
VLNEXT
1252
+ VM_TOTAL
1252
1253
VSTATUS
1253
1254
VREPRINT
1254
1255
VWERASE
@@ -1808,6 +1809,7 @@ utimensat
1808
1809
utmpx
1809
1810
utrace
1810
1811
vm_size_t
1812
+ vmtotal
1811
1813
wait4
1812
1814
waitid
1813
1815
xallocx
Original file line number Diff line number Diff line change @@ -462,6 +462,24 @@ s! {
462
462
pub sem_otime: :: time_t,
463
463
pub sem_ctime: :: time_t,
464
464
}
465
+
466
+ pub struct vmtotal {
467
+ pub t_vm: u64 ,
468
+ pub t_avm: u64 ,
469
+ pub t_rm: u64 ,
470
+ pub t_arm: u64 ,
471
+ pub t_vmshr: u64 ,
472
+ pub t_avmshr: u64 ,
473
+ pub t_rmshr: u64 ,
474
+ pub t_armshr: u64 ,
475
+ pub t_free: u64 ,
476
+ pub t_rq: i16 ,
477
+ pub t_dw: i16 ,
478
+ pub t_pw: i16 ,
479
+ pub t_sl: i16 ,
480
+ pub t_sw: i16 ,
481
+ pub t_pad: [ u16 ; 3 ] ,
482
+ }
465
483
}
466
484
467
485
s_no_extra_traits ! {
@@ -1080,6 +1098,8 @@ pub const TIOCSIG: ::c_uint = 0x2004745f;
1080
1098
pub const TIOCM_DCD : :: c_int = 0x40 ;
1081
1099
pub const H4DISC : :: c_int = 0x7 ;
1082
1100
1101
+ pub const VM_TOTAL : :: c_int = 1 ;
1102
+
1083
1103
pub const BIOCSETFNR : :: c_ulong = 0x80104282 ;
1084
1104
1085
1105
pub const FIODGNAME : :: c_ulong = 0x80106678 ;
You can’t perform that action at this time.
0 commit comments