CommonLibSSE (Parapets fork)
MemoryPage.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/M/MemoryManager.h"
4 
5 namespace RE
6 {
7  namespace BSScript
8  {
9  // All stack frame pointers are offset by 4
10  // The actual stack frame is kept here
11  struct MemoryPage
12  {
14 
15  template <class T>
16  T* GetData()
17  {
18  return reinterpret_cast<T*>(buf);
19  }
20 
21  void* GetHead();
22  void* GetTail();
23  bool IsInRange(const void* a_ptr);
24 
25  // members
26  std::uint32_t pageSize; // 00
27  char buf[0]; // 04
28  };
29  static_assert(sizeof(MemoryPage) == 0x4); // pages can be larger
30  }
31 }
Definition: AbsorbEffect.h:6
Definition: MemoryPage.h:12
bool IsInRange(const void *a_ptr)
std::uint32_t pageSize
Definition: MemoryPage.h:26
char buf[0]
Definition: MemoryPage.h:27
T * GetData()
Definition: MemoryPage.h:16