mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:27:45 +00:00
Kernel: Access MemoryManager static functions statically
SonarCloud flagged this "Code Smell", where we are accessing these static methods as if they are instance methods. While it is technically possible, it is very confusing to read when you realize they are static functions.
This commit is contained in:
parent
024367d82e
commit
0223faf6f4
6 changed files with 11 additions and 9 deletions
|
@ -23,7 +23,7 @@ KResultOr<FlatPtr> Process::sys$purge(int mode)
|
|||
NonnullRefPtrVector<Memory::AnonymousVMObject> vmobjects;
|
||||
{
|
||||
KResult result(KSuccess);
|
||||
MM.for_each_vmobject([&](auto& vmobject) {
|
||||
Memory::MemoryManager::for_each_vmobject([&](auto& vmobject) {
|
||||
if (vmobject.is_anonymous()) {
|
||||
// In the event that the append fails, only attempt to continue
|
||||
// the purge if we have already appended something successfully.
|
||||
|
@ -46,7 +46,7 @@ KResultOr<FlatPtr> Process::sys$purge(int mode)
|
|||
NonnullRefPtrVector<Memory::InodeVMObject> vmobjects;
|
||||
{
|
||||
KResult result(KSuccess);
|
||||
MM.for_each_vmobject([&](auto& vmobject) {
|
||||
Memory::MemoryManager::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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue