Skip to content

Commit

Permalink
Auto merge of #2921 - naricc:naricc/macosx-fix, r=JohnTitor
Browse files Browse the repository at this point in the history
Exposed malloc_size on Mac

This change exposes malloc_size, which is available in libc on MacOSX.
  • Loading branch information
bors committed Sep 23, 2022
2 parents d696739 + ada0d39 commit 35cd8f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libc-test/semver/apple.txt
Expand Up @@ -1951,7 +1951,9 @@ mach_vm_offset_t
mach_vm_size_t
madvise
malloc_default_zone
malloc_good_size
malloc_printf
malloc_size
malloc_statistics_t
malloc_zone_calloc
malloc_zone_check
Expand Down
3 changes: 3 additions & 0 deletions src/unix/bsd/apple/mod.rs
Expand Up @@ -5789,6 +5789,9 @@ extern "C" {
attrBufSize: ::size_t,
options: u64,
) -> ::c_int;

pub fn malloc_size(ptr: *const ::c_void) -> ::size_t;
pub fn malloc_good_size(size: ::size_t) -> ::size_t;
}

pub unsafe fn mach_task_self() -> ::mach_port_t {
Expand Down

0 comments on commit 35cd8f0

Please sign in to comment.