Nucleus
Barry Virtual Memory Regions and namespace 381dc7b (3 years, 3 months ago)
#ifndef MEMORY_NAMESPACE_H
#define MEMORY_NAMESPACE_H
#include <nucleus/object.h>
#include <nucleus/vfs.h>
/* Structure for a Page in a Cache */
struct Page {
Object obj;
off_t offset;
page_t frame;
};
/* Virtual Memory namespace */
struct VirtualMemory {
Object obj;
ObjectList *regions;
};
/* Structure for a Virtual Memory Region object */
struct VMRegion {
Object obj;
uintptr_t start, end;
int prot;
int flags;
off_t offset;
File *front, *back;
};
#endif