BarryServer : Git

All the code for all my projects
// BarryServer : Git / Nucleus / commit / 381dc7b37e5dfe249412ce3559e8b0dcd56f6267 / memory / namespace.h

// Related

Nucleus

Barry Virtual Memory Regions and namespace 381dc7b (3 years, 3 months ago)
diff --git a/memory/namespace.h b/memory/namespace.h
new file mode 100644
index 0000000..20a8e20
--- /dev/null
+++ b/memory/namespace.h
@@ -0,0 +1,30 @@
+#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