apple add malloc_zone_t definition for x86_64 only.
This commit is contained in:
parent
a128dcf577
commit
caa06fac88
|
@ -3,3 +3,4 @@ __darwin_x86_exception_state64
|
|||
__darwin_x86_float_state64
|
||||
__darwin_x86_thread_state64
|
||||
__darwin_xmm_reg
|
||||
malloc_introspection_t
|
||||
|
|
|
@ -43,6 +43,10 @@ s! {
|
|||
pub bh_datalen: u32,
|
||||
pub bh_hdrlen: ::c_ushort,
|
||||
}
|
||||
|
||||
pub struct malloc_zone_t {
|
||||
__private: [::uintptr_t; 18], // FIXME: keeping private for now
|
||||
}
|
||||
}
|
||||
|
||||
s_no_extra_traits! {
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
pub type boolean_t = ::c_int;
|
||||
|
||||
s! {
|
||||
pub struct malloc_zone_t {
|
||||
__private: [::uintptr_t; 18], // FIXME: needs arm64 auth pointers support
|
||||
}
|
||||
}
|
||||
|
||||
cfg_if! {
|
||||
if #[cfg(libc_align)] {
|
||||
mod align;
|
||||
|
|
|
@ -102,6 +102,74 @@ s! {
|
|||
pub struct __darwin_xmm_reg {
|
||||
pub __xmm_reg: [::c_char; 16],
|
||||
}
|
||||
|
||||
pub struct malloc_introspection_t {
|
||||
_private: [::uintptr_t; 16], // FIXME: keeping private for now
|
||||
}
|
||||
|
||||
pub struct malloc_zone_t {
|
||||
_reserved1: *mut ::c_void,
|
||||
_reserved2: *mut ::c_void,
|
||||
pub size: Option<unsafe extern "C" fn(
|
||||
zone: *mut malloc_zone_t,
|
||||
ptr: *const ::c_void,
|
||||
) -> ::size_t>,
|
||||
pub malloc: Option<unsafe extern "C" fn(
|
||||
zone: *mut malloc_zone_t,
|
||||
size: ::size_t,
|
||||
) -> *mut ::c_void>,
|
||||
pub calloc: Option<unsafe extern "C" fn(
|
||||
zone: *mut malloc_zone_t,
|
||||
num_items: ::size_t,
|
||||
size: ::size_t,
|
||||
) -> *mut ::c_void>,
|
||||
pub valloc: Option<unsafe extern "C" fn(
|
||||
zone: *mut malloc_zone_t,
|
||||
size: ::size_t
|
||||
) -> *mut ::c_void>,
|
||||
pub free: Option<unsafe extern "C" fn(
|
||||
zone: *mut malloc_zone_t,
|
||||
ptr: *mut ::c_void
|
||||
)>,
|
||||
pub realloc: Option<unsafe extern "C" fn(
|
||||
zone: *mut malloc_zone_t,
|
||||
ptr: *mut ::c_void,
|
||||
size: ::size_t,
|
||||
) -> *mut ::c_void>,
|
||||
pub destroy: Option<unsafe extern "C" fn(zone: *mut malloc_zone_t)>,
|
||||
pub zone_name: *const ::c_char,
|
||||
pub batch_malloc: Option<unsafe extern "C" fn(
|
||||
zone: *mut malloc_zone_t,
|
||||
size: ::size_t,
|
||||
results: *mut *mut ::c_void,
|
||||
num_requested: ::c_uint,
|
||||
) -> ::c_uint>,
|
||||
pub batch_free: Option<unsafe extern "C" fn(
|
||||
zone: *mut malloc_zone_t,
|
||||
to_be_freed: *mut *mut ::c_void,
|
||||
num_to_be_freed: ::c_uint,
|
||||
)>,
|
||||
pub introspect: *mut malloc_introspection_t,
|
||||
pub version: ::c_uint,
|
||||
pub memalign: Option<unsafe extern "C" fn(
|
||||
zone: *mut malloc_zone_t,
|
||||
alignment: ::size_t,
|
||||
size: ::size_t,
|
||||
) -> *mut ::c_void>,
|
||||
pub free_definite_size: Option<unsafe extern "C" fn(
|
||||
zone: *mut malloc_zone_t,
|
||||
ptr: *mut ::c_void,
|
||||
size: ::size_t
|
||||
)>,
|
||||
pub pressure_relief: Option<unsafe extern "C" fn(
|
||||
zone: *mut malloc_zone_t,
|
||||
goal: ::size_t,
|
||||
) -> ::size_t>,
|
||||
pub claimed_address: Option<unsafe extern "C" fn(
|
||||
zone: *mut malloc_zone_t,
|
||||
ptr: *mut ::c_void,
|
||||
) -> ::boolean_t>,
|
||||
}
|
||||
}
|
||||
|
||||
cfg_if! {
|
||||
|
|
|
@ -117,6 +117,8 @@ pub type vm_statistics_data_t = vm_statistics;
|
|||
pub type vm_statistics64_t = *mut vm_statistics64;
|
||||
pub type vm_statistics64_data_t = vm_statistics64;
|
||||
|
||||
pub type task_t = mach_port_t;
|
||||
|
||||
pub type sysdir_search_path_enumeration_state = ::c_uint;
|
||||
|
||||
pub type CCStatus = i32;
|
||||
|
@ -741,8 +743,9 @@ s! {
|
|||
pub bytes_free: ::size_t,
|
||||
}
|
||||
|
||||
pub struct malloc_zone_t {
|
||||
__private: [::uintptr_t; 18], // FIXME: keeping private for now
|
||||
pub struct vm_range_t {
|
||||
pub address: ::vm_address_t,
|
||||
pub size: ::vm_size_t,
|
||||
}
|
||||
|
||||
// sched.h
|
||||
|
|
Loading…
Reference in a new issue