Skip to content

Exposed malloc_size on Mac #2921

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions libc-test/semver/apple.txt
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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