mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:17:44 +00:00
Kernel: Move Kernel/Memory/ code into Kernel::Memory namespace
This commit is contained in:
parent
a1d7ebf85a
commit
93d98d4976
153 changed files with 473 additions and 467 deletions
|
@ -20,7 +20,7 @@ KResultOr<FlatPtr> Process::sys$purge(int mode)
|
|||
return EPERM;
|
||||
size_t purged_page_count = 0;
|
||||
if (mode & PURGE_ALL_VOLATILE) {
|
||||
NonnullRefPtrVector<AnonymousVMObject> vmobjects;
|
||||
NonnullRefPtrVector<Memory::AnonymousVMObject> vmobjects;
|
||||
{
|
||||
KResult result(KSuccess);
|
||||
MM.for_each_vmobject([&](auto& vmobject) {
|
||||
|
@ -43,14 +43,14 @@ KResultOr<FlatPtr> Process::sys$purge(int mode)
|
|||
}
|
||||
}
|
||||
if (mode & PURGE_ALL_CLEAN_INODE) {
|
||||
NonnullRefPtrVector<InodeVMObject> vmobjects;
|
||||
NonnullRefPtrVector<Memory::InodeVMObject> vmobjects;
|
||||
{
|
||||
KResult result(KSuccess);
|
||||
MM.for_each_vmobject([&](auto& vmobject) {
|
||||
if (vmobject.is_inode()) {
|
||||
// In the event that the append fails, only attempt to continue
|
||||
// the purge if we have already appended something successfully.
|
||||
if (!vmobjects.try_append(static_cast<InodeVMObject&>(vmobject)) && vmobjects.is_empty()) {
|
||||
if (!vmobjects.try_append(static_cast<Memory::InodeVMObject&>(vmobject)) && vmobjects.is_empty()) {
|
||||
result = ENOMEM;
|
||||
return IterationDecision::Break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue