mm: allow us to re-claim a page

If a page is already claimed by us, don't throw an OutOfMemory error.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2019-12-24 09:36:09 +08:00
parent 8521093f6d
commit 649d1ba26b
1 changed files with 1 additions and 1 deletions

View File

@ -118,7 +118,7 @@ impl MemoryManager {
if page > tbl.len() {
return Err(XousError::BadAddress);
}
if tbl[page] != 0 {
if tbl[page] != 0 && tbl[page] != pid {
return Err(XousError::OutOfMemory);
}
tbl[page] = pid;