summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Kernel/VM/MemoryManager.h3
-rw-r--r--Kernel/VM/PhysicalPage.h5
-rw-r--r--Kernel/VM/PhysicalRegion.h5
-rw-r--r--Kernel/VM/PhysicalZone.h5
4 files changed, 11 insertions, 7 deletions
diff --git a/Kernel/VM/MemoryManager.h b/Kernel/VM/MemoryManager.h
index d52f665aae..52615a9e90 100644
--- a/Kernel/VM/MemoryManager.h
+++ b/Kernel/VM/MemoryManager.h
@@ -105,9 +105,6 @@ extern RecursiveSpinLock s_mm_lock;
class MemoryManager {
AK_MAKE_ETERNAL
- friend class PageDirectory;
- friend class PhysicalPage;
- friend class PhysicalRegion;
friend class AnonymousVMObject;
friend class Region;
friend class VMObject;
diff --git a/Kernel/VM/PhysicalPage.h b/Kernel/VM/PhysicalPage.h
index 2b3cd4eb51..f91277070a 100644
--- a/Kernel/VM/PhysicalPage.h
+++ b/Kernel/VM/PhysicalPage.h
@@ -12,9 +12,10 @@
namespace Kernel {
class PhysicalPage {
+ AK_MAKE_NONCOPYABLE(PhysicalPage);
+ AK_MAKE_NONMOVABLE(PhysicalPage);
+
friend class MemoryManager;
- friend class PageDirectory;
- friend class VMObject;
public:
PhysicalAddress paddr() const;
diff --git a/Kernel/VM/PhysicalRegion.h b/Kernel/VM/PhysicalRegion.h
index 4ec98bb487..769ca35f30 100644
--- a/Kernel/VM/PhysicalRegion.h
+++ b/Kernel/VM/PhysicalRegion.h
@@ -13,7 +13,10 @@
namespace Kernel {
class PhysicalRegion {
- AK_MAKE_ETERNAL
+ AK_MAKE_ETERNAL;
+ AK_MAKE_NONCOPYABLE(PhysicalRegion);
+ AK_MAKE_NONMOVABLE(PhysicalRegion);
+
public:
static OwnPtr<PhysicalRegion> try_create(PhysicalAddress lower, PhysicalAddress upper)
{
diff --git a/Kernel/VM/PhysicalZone.h b/Kernel/VM/PhysicalZone.h
index 6b6a980ba8..bd3bba924e 100644
--- a/Kernel/VM/PhysicalZone.h
+++ b/Kernel/VM/PhysicalZone.h
@@ -17,7 +17,10 @@ namespace Kernel {
// The allocator uses a buddy block scheme internally.
class PhysicalZone {
- AK_MAKE_ETERNAL
+ AK_MAKE_ETERNAL;
+ AK_MAKE_NONCOPYABLE(PhysicalZone);
+ AK_MAKE_NONMOVABLE(PhysicalZone);
+
public:
static constexpr size_t ZONE_CHUNK_SIZE = PAGE_SIZE / 2;
using ChunkIndex = i16;