I have a class, page_directory, that implements a base class, address_space. I need to be able to clone an address_space& that is really a to a page_directory&. The problem is the page_directory specific data that needs to be copied.
They aren't functional yet, but you can get the idea from what I have finished.
Code:
/**
* x86_32 page directory implementation
*/
class page_directory : public address_space
{
public:
page_directory();
page_directory(const page_directory&);
void map(virtual_address, physical_address, bool writeable = true);
void unmap(virtual_address);
private:
page_directory_entry _page_directory[0x400];
};
/**
* Generic address space
*/
class address_space
{
public:
address_space();
address_space(const address_space&);
virtual void map(virtual_address, physical_address, bool writeable = true) = 0;
virtual void unmap(virtual_address) = 0;
};
Any ideas?