Skip to content

Commit

Permalink
Auto merge of #3448 - hjmallon:_hm/vmalloc, r=JohnTitor
Browse files Browse the repository at this point in the history
add vm_allocate for apple

We have vm_deallocate, why not vm_allocate too?

I am not totally sure whether these should live here or in mach2?
  • Loading branch information
bors committed Nov 18, 2023
2 parents 1ab1874 + d0d0db2 commit 4ac74f5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libc-test/semver/apple.txt
Expand Up @@ -2265,6 +2265,8 @@ uselocale
utimensat
utmpx
utmpxname
vm_allocate
vm_deallocate
vm_inherit_t
vm_map_t
vm_prot_t
Expand Down
7 changes: 7 additions & 0 deletions src/unix/bsd/apple/mod.rs
Expand Up @@ -6279,6 +6279,13 @@ extern "C" {
inheritance: ::vm_inherit_t,
) -> ::kern_return_t;

pub fn vm_allocate(
target_task: vm_map_t,
address: *mut vm_address_t,
size: vm_size_t,
flags: ::c_int,
) -> ::kern_return_t;

pub fn vm_deallocate(
target_task: vm_map_t,
address: vm_address_t,
Expand Down

0 comments on commit 4ac74f5

Please sign in to comment.