File tree 3 files changed +34
-0
lines changed
src/unix/bsd/freebsdlike/freebsd
3 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -1897,6 +1897,7 @@ fn test_freebsd(target: &str) {
1897
1897
"machine/elf.h" ,
1898
1898
"machine/reg.h" ,
1899
1899
"malloc_np.h" ,
1900
+ "memstat.h" ,
1900
1901
"mqueue.h" ,
1901
1902
"net/bpf.h" ,
1902
1903
"net/if.h" ,
@@ -2256,6 +2257,10 @@ fn test_freebsd(target: &str) {
2256
2257
// `shm_largepage_conf` was introduced in FreeBSD 13.
2257
2258
"shm_largepage_conf" if Some ( 13 ) > freebsd_ver => true ,
2258
2259
2260
+ // Those are private types
2261
+ "memory_type" => true ,
2262
+ "memory_type_list" => true ,
2263
+
2259
2264
_ => false ,
2260
2265
}
2261
2266
} ) ;
Original file line number Diff line number Diff line change @@ -1670,6 +1670,14 @@ mallocx
1670
1670
memmem
1671
1671
memrchr
1672
1672
memset_s
1673
+ memstat_get_name
1674
+ memstat_mtl_alloc
1675
+ memstat_mtl_find
1676
+ memstat_mtl_first
1677
+ memstat_mtl_free
1678
+ memstat_mtl_geterror
1679
+ memstat_mtl_next
1680
+ memstat_strerror
1673
1681
mincore
1674
1682
mkdirat
1675
1683
mkfifoat
Original file line number Diff line number Diff line change @@ -998,6 +998,14 @@ s! {
998
998
pub alloc_policy: :: c_int,
999
999
__pad: [ :: c_int; 10 ] ,
1000
1000
}
1001
+
1002
+ pub struct memory_type {
1003
+ __priv: [ :: uintptr_t; 58 ] ,
1004
+ }
1005
+
1006
+ pub struct memory_type_list {
1007
+ __priv: [ :: uintptr_t; 2 ] ,
1008
+ }
1001
1009
}
1002
1010
1003
1011
s_no_extra_traits ! {
@@ -4367,6 +4375,19 @@ extern "C" {
4367
4375
uaddr : * mut :: c_void ,
4368
4376
uaddr2 : * mut :: c_void ,
4369
4377
) -> :: c_int ;
4378
+
4379
+ pub fn memstat_strerror ( error : :: c_int ) -> * const :: c_char ;
4380
+ pub fn memstat_mtl_alloc ( ) -> * mut memory_type_list ;
4381
+ pub fn memstat_mtl_first ( list : * mut memory_type_list ) -> * mut memory_type ;
4382
+ pub fn memstat_mtl_next ( mtp : * mut memory_type ) -> * mut memory_type ;
4383
+ pub fn memstat_mtl_find (
4384
+ list : * mut memory_type_list ,
4385
+ allocator : :: c_int ,
4386
+ name : * const :: c_char ,
4387
+ ) -> * mut memory_type ;
4388
+ pub fn memstat_mtl_free ( list : * mut memory_type_list ) ;
4389
+ pub fn memstat_mtl_geterror ( list : * mut memory_type_list ) -> :: c_int ;
4390
+ pub fn memstat_get_name ( mtp : * const memory_type ) -> * const :: c_char ;
4370
4391
}
4371
4392
4372
4393
#[ link( name = "kvm" ) ]
You can’t perform that action at this time.
0 commit comments