forked from CHatingPython/towos
feat: add paging
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
#ifndef MMAP_HPP
|
||||
#define MMAP_HPP
|
||||
|
||||
#include "types.hpp"
|
||||
|
||||
struct mmap {
|
||||
static constexpr u64 MAX_ENTRY_COUNT = 170;
|
||||
|
||||
struct entry {
|
||||
enum type_e {
|
||||
INVALID = 0,
|
||||
AVAILABLE = 1,
|
||||
RESERVED = 2,
|
||||
};
|
||||
|
||||
u64 base = 0;
|
||||
u64 size = 0;
|
||||
type_e type = AVAILABLE;
|
||||
};
|
||||
|
||||
u64 entryCount = 0;
|
||||
entry entries[MAX_ENTRY_COUNT];
|
||||
};
|
||||
|
||||
static_assert(sizeof(mmap) <= 4096);
|
||||
|
||||
#endif // MMAP_HPP
|
||||
Reference in New Issue
Block a user