CommonLibSSE (powerof3)
IMemoryPagePolicy.h
Go to the documentation of this file.
1 #pragma once
2 #include "RE/M/MemoryPage.h"
3 namespace RE
4 {
5  namespace BSScript
6  {
8  {
9  public:
10  inline static constexpr auto RTTI = RTTI_BSScript__IMemoryPagePolicy;
11  inline static constexpr auto VTABLE = VTABLE_BSScript__IMemoryPagePolicy;
12 
13  enum class AllocationStatus
14  {
15  kSuccess,
16  kFailed,
18  };
19 
20  enum class NewPageStrategy
21  {
22  kNormal,
24  };
25 
26  virtual ~IMemoryPagePolicy(); // 00
27 
28  // add
29  virtual std::uint32_t MaximumPageSize() = 0; // 01
30  virtual AllocationStatus AllocatePage(std::uint32_t a_pageSize, NewPageStrategy a_stategy, BSTAutoPointer<MemoryPage>& a_newPage) = 0; // 02
32  virtual void DisposePage(BSTAutoPointer<MemoryPage>& a_oldPage) = 0; // 04
33  };
34  static_assert(sizeof(IMemoryPagePolicy) == 0x8);
35  }
36 }
Definition: BSTSmartPointer.h:37
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_BSScript__IMemoryPagePolicy(static_cast< std::uint64_t >(691841))
constexpr std::array< REL::ID, 1 > VTABLE_BSScript__IMemoryPagePolicy
Definition: Offsets_VTABLE.h:9453
Definition: IMemoryPagePolicy.h:8
virtual AllocationStatus AllocatePage(std::uint32_t a_pageSize, NewPageStrategy a_stategy, BSTAutoPointer< MemoryPage > &a_newPage)=0
virtual void DisposePage(BSTAutoPointer< MemoryPage > &a_oldPage)=0
NewPageStrategy
Definition: IMemoryPagePolicy.h:21
AllocationStatus
Definition: IMemoryPagePolicy.h:14
virtual std::uint32_t MaximumPageSize()=0
virtual AllocationStatus GetLargestAvailablePage(BSTAutoPointer< MemoryPage > &a_newPage)=0
static constexpr auto RTTI
Definition: IMemoryPagePolicy.h:10
static constexpr auto VTABLE
Definition: IMemoryPagePolicy.h:11