Merge pull request #15867 from devnexen/haiku_malloc_usable_size

std.c: haiku also supports malloc_usable_size to benefit zig's heap
This commit is contained in:
Andrew Kelley 2023-06-18 12:44:08 -07:00 committed by GitHub
commit 3ef91233ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -21,6 +21,7 @@ pub extern "c" fn dl_iterate_phdr(callback: dl_iterate_phdr_callback, data: ?*an
pub extern "c" fn lwp_gettid() c_int; pub extern "c" fn lwp_gettid() c_int;
pub extern "c" fn posix_memalign(memptr: *?*anyopaque, alignment: usize, size: usize) c_int; pub extern "c" fn posix_memalign(memptr: *?*anyopaque, alignment: usize, size: usize) c_int;
pub extern "c" fn malloc_usable_size(?*const anyopaque) usize;
pub const pthread_mutex_t = extern struct { pub const pthread_mutex_t = extern struct {
inner: ?*anyopaque = null, inner: ?*anyopaque = null,

View File

@ -1071,3 +1071,5 @@ pub const sigevent = extern struct {
/// TODO refines if necessary /// TODO refines if necessary
pub const PTHREAD_STACK_MIN = 2 * 4096; pub const PTHREAD_STACK_MIN = 2 * 4096;
pub extern "c" fn malloc_usable_size(?*anyopaque) usize;