[zion] Fix an over-allocation bug when creating a memory object
This commit is contained in:
parent
0f0e39d1e9
commit
b6735d3175
3 changed files with 9 additions and 2 deletions
|
|
@ -138,7 +138,7 @@ z_err_t MemoryObjectCreatePhysical(ZMemoryObjectCreatePhysicalReq* req,
|
|||
auto& curr_proc = gScheduler->CurrentProcess();
|
||||
uint64_t paddr = req->paddr;
|
||||
if (paddr == 0) {
|
||||
paddr = phys_mem::AllocateContinuous((req->size - 1 / 0x1000) + 1);
|
||||
paddr = phys_mem::AllocateContinuous(((req->size - 1) / 0x1000) + 1);
|
||||
}
|
||||
auto vmmo_ref = MakeRefCounted<FixedMemoryObject>(paddr, req->size);
|
||||
resp->vmmo_cap =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue