Luna/kernel/include/memory/AddressSpace.h

28 lines
344 B
C++

#pragma once
#include "memory/Paging.h"
struct AddressSpace
{
static AddressSpace create();
void destroy();
void detach();
AddressSpace clone();
PageTable* get_pml4()
{
return m_pml4;
}
bool is_cloned()
{
return *m_refs > 1;
}
private:
PageTable* m_pml4;
int* m_refs;
};