Skip to content

Commit d5929b7

Browse files
committed
Auto merge of #2256 - devnexen:malloc_zone2_apple, r=JohnTitor
apple adding allocation from zone api
2 parents fda5722 + 635f77b commit d5929b7

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

libc-test/semver/apple.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1684,13 +1684,20 @@ mach_thread_self
16841684
mach_timebase_info
16851685
mach_timebase_info_data_t
16861686
madvise
1687+
malloc_default_zone
16871688
malloc_statistics_t
1689+
malloc_zone_calloc
16881690
malloc_zone_check
1691+
malloc_zone_free
1692+
malloc_zone_from_ptr
16891693
malloc_zone_log
1694+
malloc_zone_malloc
16901695
malloc_zone_print
16911696
malloc_zone_print_ptr_info
1697+
malloc_zone_realloc
16921698
malloc_zone_statistics
16931699
malloc_zone_t
1700+
malloc_zone_valloc
16941701
max_align_t
16951702
mcontext_t
16961703
memset_pattern4

src/unix/bsd/apple/mod.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4075,6 +4075,21 @@ extern "C" {
40754075
pub fn malloc_zone_statistics(zone: *mut ::malloc_zone_t, stats: *mut malloc_statistics_t);
40764076
pub fn malloc_zone_log(zone: *mut ::malloc_zone_t, address: *mut ::c_void);
40774077
pub fn malloc_zone_print_ptr_info(ptr: *mut ::c_void);
4078+
pub fn malloc_default_zone() -> *mut ::malloc_zone_t;
4079+
pub fn malloc_zone_from_ptr(ptr: *const ::c_void) -> *mut ::malloc_zone_t;
4080+
pub fn malloc_zone_malloc(zone: *mut ::malloc_zone_t, size: ::size_t) -> *mut ::c_void;
4081+
pub fn malloc_zone_valloc(zone: *mut ::malloc_zone_t, size: ::size_t) -> *mut ::c_void;
4082+
pub fn malloc_zone_calloc(
4083+
zone: *mut ::malloc_zone_t,
4084+
num_items: ::size_t,
4085+
size: ::size_t,
4086+
) -> *mut ::c_void;
4087+
pub fn malloc_zone_realloc(
4088+
zone: *mut ::malloc_zone_t,
4089+
ptr: *mut ::c_void,
4090+
size: ::size_t,
4091+
) -> *mut ::c_void;
4092+
pub fn malloc_zone_free(zone: *mut ::malloc_zone_t, ptr: *mut ::c_void);
40784093

40794094
pub fn proc_listpids(
40804095
t: u32,

0 commit comments

Comments
 (0)