1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:57:45 +00:00

Kernel: Move Kernel/Memory/ code into Kernel::Memory namespace

This commit is contained in:
Andreas Kling 2021-08-06 13:49:36 +02:00
parent a1d7ebf85a
commit 93d98d4976
153 changed files with 473 additions and 467 deletions

View file

@ -37,7 +37,7 @@ void MemoryDevice::did_seek(FileDescription&, off_t)
TODO();
}
KResultOr<Region*> MemoryDevice::mmap(Process& process, FileDescription&, const Range& range, u64 offset, int prot, bool shared)
KResultOr<Memory::Region*> MemoryDevice::mmap(Process& process, FileDescription&, Memory::Range const& range, u64 offset, int prot, bool shared)
{
auto viewed_address = PhysicalAddress(offset);
@ -47,7 +47,7 @@ KResultOr<Region*> MemoryDevice::mmap(Process& process, FileDescription&, const
return EINVAL;
}
auto vmobject = AnonymousVMObject::try_create_for_physical_range(viewed_address, range.size());
auto vmobject = Memory::AnonymousVMObject::try_create_for_physical_range(viewed_address, range.size());
if (!vmobject)
return ENOMEM;
dbgln("MemoryDevice: Mapped physical memory at {} for range of {} bytes", viewed_address, range.size());