2019-05-16 01:02:37 +00:00
|
|
|
#include <Kernel/FileSystem/FileSystem.h>
|
|
|
|
#include <Kernel/FileSystem/Inode.h>
|
2019-06-07 09:43:58 +00:00
|
|
|
#include <Kernel/VM/MemoryManager.h>
|
|
|
|
#include <Kernel/VM/VMObject.h>
|
2019-04-03 13:13:07 +00:00
|
|
|
|
2019-08-07 16:06:17 +00:00
|
|
|
VMObject::VMObject(const VMObject& other)
|
2019-08-07 18:12:50 +00:00
|
|
|
: m_physical_pages(other.m_physical_pages)
|
2019-04-03 13:13:07 +00:00
|
|
|
{
|
2019-12-19 18:13:44 +00:00
|
|
|
MM.register_vmobject(*this);
|
2019-04-03 13:13:07 +00:00
|
|
|
}
|
|
|
|
|
2019-08-07 18:12:50 +00:00
|
|
|
VMObject::VMObject(size_t size)
|
|
|
|
: m_physical_pages(ceil_div(size, PAGE_SIZE))
|
2019-04-03 13:13:07 +00:00
|
|
|
{
|
2019-12-19 18:13:44 +00:00
|
|
|
MM.register_vmobject(*this);
|
2019-04-03 13:13:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
VMObject::~VMObject()
|
|
|
|
{
|
2019-12-19 18:13:44 +00:00
|
|
|
MM.unregister_vmobject(*this);
|
2019-04-03 13:13:07 +00:00
|
|
|
}
|