Round up RM session size to page granularity

Since RM sessions can be used as dataspaces and dataspace sizes are
supposed to have page granularity, RM session sizes should have page
granularity, too.

Fixes #799.
This commit is contained in:
Christian Prochaska 2013-07-10 21:28:48 +02:00 committed by Norman Feske
parent b1cb1ceaf9
commit 09049278a6
1 changed files with 3 additions and 2 deletions

View File

@ -806,10 +806,11 @@ Rm_session_component::Rm_session_component(Rpc_entrypoint *ds_ep,
_md_alloc(md_alloc, ram_quota),
_client_slab(&_md_alloc), _ref_slab(&_md_alloc),
_map(&_md_alloc), _pager_ep(pager_ep),
_ds(vm_size), _ds_cap(_type_deduction_helper(ds_ep->manage(&_ds)))
_ds(align_addr(vm_size, get_page_size_log2())),
_ds_cap(_type_deduction_helper(ds_ep->manage(&_ds)))
{
/* configure managed VM area */
_map.add_range(vm_start, vm_size);
_map.add_range(vm_start, align_addr(vm_size, get_page_size_log2()));
}