@@ -44,6 +44,15 @@ pub type processor_flavor_t = ::c_int;
44
44
pub type thread_flavor_t = natural_t ;
45
45
pub type thread_inspect_t = mach_port_t ;
46
46
pub type policy_t = :: c_int ;
47
+ pub type mach_vm_address_t = u64 ;
48
+ pub type mach_vm_offset_t = u64 ;
49
+ pub type mach_vm_size_t = u64 ;
50
+ pub type vm_map_t = :: mach_port_t ;
51
+ pub type mem_entry_name_port_t = :: mach_port_t ;
52
+ pub type memory_object_t = :: mach_port_t ;
53
+ pub type memory_object_offset_t = :: c_ulonglong ;
54
+ pub type vm_inherit_t = :: c_uint ;
55
+ pub type vm_prot_t = :: c_int ;
47
56
48
57
pub type iconv_t = * mut :: c_void ;
49
58
@@ -93,7 +102,6 @@ pub type CCCryptorStatus = i32;
93
102
pub type CCRNGStatus = :: CCCryptorStatus ;
94
103
95
104
deprecated_mach ! {
96
- pub type vm_prot_t = :: c_int;
97
105
pub type vm_size_t = :: uintptr_t;
98
106
pub type mach_timebase_info_data_t = mach_timebase_info;
99
107
}
@@ -3318,6 +3326,11 @@ pub const VM_LOADAVG: ::c_int = 2;
3318
3326
pub const VM_MACHFACTOR : :: c_int = 4 ;
3319
3327
pub const VM_SWAPUSAGE : :: c_int = 5 ;
3320
3328
pub const VM_MAXID : :: c_int = 6 ;
3329
+ pub const VM_PROT_NONE : :: vm_prot_t = 0x00 ;
3330
+ pub const VM_PROT_READ : :: vm_prot_t = 0x01 ;
3331
+ pub const VM_PROT_WRITE : :: vm_prot_t = 0x02 ;
3332
+ pub const VM_PROT_EXECUTE : :: vm_prot_t = 0x04 ;
3333
+ pub const MEMORY_OBJECT_NULL : :: memory_object_t = 0 ;
3321
3334
pub const HW_MACHINE : :: c_int = 1 ;
3322
3335
pub const HW_MODEL : :: c_int = 2 ;
3323
3336
pub const HW_NCPU : :: c_int = 3 ;
@@ -4403,6 +4416,20 @@ extern "C" {
4403
4416
pub fn CCRandomGenerateBytes ( bytes : * mut :: c_void , size : :: size_t ) -> :: CCRNGStatus ;
4404
4417
4405
4418
pub fn _NSGetExecutablePath ( buf : * mut :: c_char , bufsize : * mut u32 ) -> :: c_int ;
4419
+
4420
+ pub fn mach_vm_map (
4421
+ target_task : :: vm_map_t ,
4422
+ address : * mut :: mach_vm_address_t ,
4423
+ size : :: mach_vm_size_t ,
4424
+ mask : :: mach_vm_offset_t ,
4425
+ flags : :: c_int ,
4426
+ object : :: mem_entry_name_port_t ,
4427
+ offset : :: memory_object_offset_t ,
4428
+ copy : :: boolean_t ,
4429
+ cur_protection : :: vm_prot_t ,
4430
+ max_protection : :: vm_prot_t ,
4431
+ inheritance : :: vm_inherit_t ,
4432
+ ) -> :: kern_return_t ;
4406
4433
}
4407
4434
4408
4435
cfg_if ! {
0 commit comments