mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 21:08:12 +00:00
LibCore: Add syscall wrapper for munmap()
This commit is contained in:
parent
53e9b9758e
commit
45842a5208
2 changed files with 8 additions and 0 deletions
|
@ -85,4 +85,11 @@ ErrorOr<void*> mmap(void* address, size_t size, int protection, int flags, int f
|
|||
#endif
|
||||
}
|
||||
|
||||
ErrorOr<void> munmap(void* address, size_t size)
|
||||
{
|
||||
if (::munmap(address, size) < 0)
|
||||
return Error::from_syscall("munmap"sv, -errno);
|
||||
return {};
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue