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:
		@@ -118,7 +118,7 @@ impl MemoryManager {
 | 
				
			|||||||
        if page > tbl.len() {
 | 
					        if page > tbl.len() {
 | 
				
			||||||
            return Err(XousError::BadAddress);
 | 
					            return Err(XousError::BadAddress);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        if tbl[page] != 0 {
 | 
					        if tbl[page] != 0 && tbl[page] != pid {
 | 
				
			||||||
            return Err(XousError::OutOfMemory);
 | 
					            return Err(XousError::OutOfMemory);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        tbl[page] = pid;
 | 
					        tbl[page] = pid;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user