commit 3ef91233caf2c637797d84527a4e78f870e4b4b9 (tree)
parent 2839e35d1c06ca5b6bda1f20ae870f2b2fbbbfb1
Author: Andrew Kelley <andrew@ziglang.org>
Date: Sun, 18 Jun 2023 12:44:08 -0700
Merge pull request #15867 from devnexen/haiku_malloc_usable_size
std.c: haiku also supports malloc_usable_size to benefit zig's heap
Diffstat:
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/lib/std/c/dragonfly.zig b/lib/std/c/dragonfly.zig
@@ -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 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 {
inner: ?*anyopaque = null,
diff --git a/lib/std/c/haiku.zig b/lib/std/c/haiku.zig
@@ -1071,3 +1071,5 @@ pub const sigevent = extern struct {
/// TODO refines if necessary
pub const PTHREAD_STACK_MIN = 2 * 4096;
+
+pub extern "c" fn malloc_usable_size(?*anyopaque) usize;