lib: c: io: munmap now unmaps and unreserves a region of memory

This commit is contained in:
2026-03-21 10:40:15 +00:00
parent 9148349f44
commit 7a00de28a1

View File

@@ -25,7 +25,17 @@ int munmap(void *addr, size_t length)
status = address_space_unmap(address_space, (virt_addr_t)addr, length);
if (status != KERN_OK) {
kern_handle_close(address_space);
return __set_errno(__errno_from_kern_status(status));
}
status = address_space_release(
address_space,
(virt_addr_t)addr,
length);
kern_handle_close(address_space);
if (status != KERN_OK) {
return __set_errno(__errno_from_kern_status(status));
}