#ifndef MEMORY_NAMESPACE_H #define MEMORY_NAMESPACE_H #include #include #include #include /* 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; VMRegion *stack; page_dir_t pageDir; }; /* 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; }; void switch_dir(page_dir_t dir); VMRegion *vm_create_region(void *addr, size_t len, int prot, int flags, off_t offset, File *back); #endif