sel4: free-up virtual regions in core

Fixes #2505
This commit is contained in:
Alexander Boettcher 2017-08-21 10:33:01 +02:00 committed by Christian Helmuth
parent a63eb3cc37
commit 09ce611353
1 changed files with 8 additions and 1 deletions

View File

@ -69,5 +69,12 @@ Core_region_map::attach(Dataspace_capability ds_cap, size_t size,
void Core_region_map::detach(Local_addr core_local_addr)
{
size_t size = platform_specific()->region_alloc_size_at(core_local_addr);
unmap_local(core_local_addr, size >> get_page_size_log2());
if (!unmap_local(core_local_addr, size >> get_page_size_log2())) {
Genode::error("could not unmap core virtual address ",
Hex(core_local_addr), " in ", __PRETTY_FUNCTION__);
return;
}
platform()->region_alloc()->free(core_local_addr);
}