CommonLibSSE NG
SimpleAllocMemoryPagePolicy.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSAtomic.h"
5 
6 namespace RE
7 {
8  namespace BSScript
9  {
11  {
12  public:
13  inline static constexpr auto RTTI = RTTI_BSScript__SimpleAllocMemoryPagePolicy;
14  inline static constexpr auto VTABLE = VTABLE_BSScript__SimpleAllocMemoryPagePolicy;
15 
16  ~SimpleAllocMemoryPagePolicy() override; // 00
17 
18  // override (IMemoryPagePolicy)
19  std::uint32_t MaximumPageSize() override; // 01 - { return maxPageSize; }
20  AllocationStatus AllocatePage(std::uint32_t a_pageSize, NewPageStrategy a_stategy, BSTAutoPointer<MemoryPage>& a_newPage) override; // 02
22  void DisposePage(BSTAutoPointer<MemoryPage>& a_newPage) override; // 04
23 
24  // members
25  const std::uint32_t minPageSize{ 0 }; // 08
26  const std::uint32_t maxPageSize{ 0 }; // 0C
27  const std::uint32_t maxAllocatedMemory{ 0 }; // 10
28  const bool ignoreMemoryLimit{ 0 }; // 14 - Set each update by overstress status
30  std::uint32_t currentMemorySize; // 20
31  std::uint32_t maxAdditionalAllocations; // 20
32  };
33  static_assert(sizeof(SimpleAllocMemoryPagePolicy) == 0x28);
34  }
35 }
Definition: SimpleAllocMemoryPagePolicy.h:11
const bool ignoreMemoryLimit
Definition: SimpleAllocMemoryPagePolicy.h:28
const std::uint32_t maxAllocatedMemory
Definition: SimpleAllocMemoryPagePolicy.h:27
static constexpr auto RTTI
Definition: SimpleAllocMemoryPagePolicy.h:13
AllocationStatus GetLargestAvailablePage(BSTAutoPointer< MemoryPage > &a_newPage) override
void DisposePage(BSTAutoPointer< MemoryPage > &a_newPage) override
std::uint32_t maxAdditionalAllocations
Definition: SimpleAllocMemoryPagePolicy.h:31
std::uint32_t MaximumPageSize() override
BSSpinLock dataLock
Definition: SimpleAllocMemoryPagePolicy.h:29
static constexpr auto VTABLE
Definition: SimpleAllocMemoryPagePolicy.h:14
const std::uint32_t maxPageSize
Definition: SimpleAllocMemoryPagePolicy.h:26
std::uint32_t currentMemorySize
Definition: SimpleAllocMemoryPagePolicy.h:30
AllocationStatus AllocatePage(std::uint32_t a_pageSize, NewPageStrategy a_stategy, BSTAutoPointer< MemoryPage > &a_newPage) override
const std::uint32_t minPageSize
Definition: SimpleAllocMemoryPagePolicy.h:25
Definition: BSAtomic.h:51
Definition: BSTSmartPointer.h:36
Definition: AbsorbEffect.h:6
constexpr std::array< REL::VariantID, 1 > VTABLE_BSScript__SimpleAllocMemoryPagePolicy
Definition: Offsets_VTABLE.h:7052
constexpr REL::VariantID RTTI_BSScript__SimpleAllocMemoryPagePolicy(691842, 399886, 0x1f7d2f0)
Definition: IMemoryPagePolicy.h:8
NewPageStrategy
Definition: IMemoryPagePolicy.h:20
AllocationStatus
Definition: IMemoryPagePolicy.h:13