Skip to content

Commit 35cd8f0

Browse files
committed
Auto merge of #2921 - naricc:naricc/macosx-fix, r=JohnTitor
Exposed malloc_size on Mac This change exposes malloc_size, which is available in libc on MacOSX.
2 parents d696739 + ada0d39 commit 35cd8f0

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

libc-test/semver/apple.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1951,7 +1951,9 @@ mach_vm_offset_t
19511951
mach_vm_size_t
19521952
madvise
19531953
malloc_default_zone
1954+
malloc_good_size
19541955
malloc_printf
1956+
malloc_size
19551957
malloc_statistics_t
19561958
malloc_zone_calloc
19571959
malloc_zone_check

src/unix/bsd/apple/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5789,6 +5789,9 @@ extern "C" {
57895789
attrBufSize: ::size_t,
57905790
options: u64,
57915791
) -> ::c_int;
5792+
5793+
pub fn malloc_size(ptr: *const ::c_void) -> ::size_t;
5794+
pub fn malloc_good_size(size: ::size_t) -> ::size_t;
57925795
}
57935796

57945797
pub unsafe fn mach_task_self() -> ::mach_port_t {

0 commit comments

Comments
 (0)