Skip to content

Commit

Permalink
Merge pull request ziglang#15867 from devnexen/haiku_malloc_usable_size
Browse files Browse the repository at this point in the history
std.c: haiku also supports malloc_usable_size to benefit zig's heap
  • Loading branch information
andrewrk committed Jun 18, 2023
2 parents 2839e35 + fcaf4e7 commit 3ef9123
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/std/c/dragonfly.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions lib/std/c/haiku.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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;

0 comments on commit 3ef9123

Please sign in to comment.