mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:27:44 +00:00
Kernel: Remove some friendships and make some classes non-copy/moveable
This commit is contained in:
parent
424afdd72b
commit
de4ba1f39b
4 changed files with 11 additions and 7 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue