[Mammoth] Move all callers of FromCapability to OwnedMemoryObject.
This commit is contained in:
parent
337126cabb
commit
8e827a5dfb
24 changed files with 175 additions and 87 deletions
|
|
@ -20,6 +20,8 @@ MemoryObject::MemoryObject(uint64_t size) : size_(size) {
|
|||
}
|
||||
}
|
||||
|
||||
MemoryObject::~MemoryObject() { dbgln("Memory Object Freed"); }
|
||||
|
||||
uint64_t MemoryObject::PhysicalPageAtOffset(uint64_t offset) {
|
||||
if (offset > size_) {
|
||||
panic("Invalid offset");
|
||||
|
|
|
|||
|
|
@ -27,7 +27,8 @@ class MemoryObject : public KernelObject {
|
|||
kZionPerm_Transmit;
|
||||
}
|
||||
|
||||
MemoryObject(uint64_t size);
|
||||
explicit MemoryObject(uint64_t size);
|
||||
~MemoryObject();
|
||||
|
||||
uint64_t size() { return size_; }
|
||||
uint64_t num_pages() { return size_ / 0x1000; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue