BarryServer : Git

All the code for all my projects
// BarryServer : Git / Nucleus / blob / 7864e7f8ed319f380849d97675be53f53c953f9d / memory / namespace.h

// Related

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