mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-28 15:34:33 +00:00
Refactor VirtualMemoryArea::Fork to use auto&
This commit is contained in:
parent
de220bf879
commit
9538b8ef31
@ -345,7 +345,7 @@ namespace Memory
|
|||||||
|
|
||||||
Memory::Virtual vmm(this->Table);
|
Memory::Virtual vmm(this->Table);
|
||||||
SmartLock(MgrLock);
|
SmartLock(MgrLock);
|
||||||
foreach (auto ap in Parent->GetAllocatedPagesList())
|
foreach (auto &ap in Parent->GetAllocatedPagesList())
|
||||||
{
|
{
|
||||||
MgrLock.Unlock();
|
MgrLock.Unlock();
|
||||||
void *Address = this->RequestPages(ap.PageCount);
|
void *Address = this->RequestPages(ap.PageCount);
|
||||||
@ -382,12 +382,12 @@ namespace Memory
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (auto sr in Parent->GetSharedRegions())
|
foreach (auto &sr in Parent->GetSharedRegions())
|
||||||
{
|
{
|
||||||
MgrLock.Unlock();
|
MgrLock.Unlock();
|
||||||
void *Address = this->CreateCoWRegion(sr.Address, sr.Length,
|
void *Address = this->CreateCoWRegion(sr.Address, sr.Length,
|
||||||
sr.Read, sr.Write, sr.Exec,
|
sr.Read, sr.Write, sr.Exec,
|
||||||
sr.Fixed, sr.Shared);
|
sr.Fixed, sr.Shared);
|
||||||
MgrLock.Lock(__FUNCTION__);
|
MgrLock.Lock(__FUNCTION__);
|
||||||
if (Address == nullptr)
|
if (Address == nullptr)
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user