Class Mem replaced to VirtualMemory.
This commit is contained in:
parent
20313cbc56
commit
2bf5ffb2df
12 changed files with 147 additions and 384 deletions
|
@ -51,9 +51,11 @@ public:
|
|||
static void *allocateLargePagesMemory(size_t size);
|
||||
static void flushInstructionCache(void *p, size_t size);
|
||||
static void freeLargePagesMemory(void *p, size_t size);
|
||||
static void init(bool hugePages);
|
||||
static void protectExecutableMemory(void *p, size_t size);
|
||||
static void unprotectExecutableMemory(void *p, size_t size);
|
||||
|
||||
static inline bool isHugepagesAvailable() { return (m_globalFlags & HUGEPAGES_AVAILABLE) != 0; }
|
||||
static inline constexpr size_t align(size_t pos, size_t align = 2097152) { return ((pos - 1) / align + 1) * align; }
|
||||
|
||||
private:
|
||||
|
@ -63,6 +65,8 @@ private:
|
|||
LOCK = 4
|
||||
};
|
||||
|
||||
static int m_globalFlags;
|
||||
|
||||
int m_flags = 0;
|
||||
size_t m_size = 0;
|
||||
uint8_t *m_scratchpad = nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue