mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 17:22:43 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			21 lines
		
	
	
	
		
			457 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			21 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);
 | |
| }
 | 
