mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
22 lines
457 B
C++
22 lines
457 B
C++
#include <Kernel/FileSystem/FileSystem.h>
|
|
#include <Kernel/FileSystem/Inode.h>
|
|
#include <Kernel/VM/MemoryManager.h>
|
|
#include <Kernel/VM/VMObject.h>
|
|
|
|
VMObject::VMObject(const VMObject& other)
|
|
: m_physical_pages(other.m_physical_pages)
|
|
{
|
|
MM.register_vmobject(*this);
|
|
}
|
|
|
|
VMObject::VMObject(size_t size)
|
|
: m_physical_pages(ceil_div(size, PAGE_SIZE))
|
|
{
|
|
MM.register_vmobject(*this);
|
|
}
|
|
|
|
VMObject::~VMObject()
|
|
{
|
|
MM.unregister_vmobject(*this);
|
|
}
|