CommonLibSSE (powerof3)
CompactingStore.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 CompactingStore
9  {
10  class BlockHeader;
11  class FreeBlock;
12  class StoreBlock;
13 
14  class Store : public IMemoryStoreBase
15  {
16  public:
17  inline static constexpr auto RTTI = RTTI_CompactingStore__Store;
18  inline static constexpr auto VTABLE = VTABLE_CompactingStore__Store;
19 
20  ~Store() override; // 00
21 
22  // override (IMemoryStoreBase)
23  std::size_t Size(const void* a_block) const override; // 01
24  void GetMemoryStats(MemoryStats* a_stats) override; // 02
25  bool ContainsBlockImpl(const void* a_block) const override; // 03
26 
27  // members
29  void* allocBase;
30  void* allocEndMin;
31  void* allocEnd;
32  void* storeEnd;
33  BlockHeader* lastBlock;
34  FreeBlock* smallFree[66];
35  FreeBlock* currentFree;
36  FreeBlock* nextMerge;
37  StoreBlock* storeBlockMin;
38  StoreBlock* nextStoreBlock;
39  StoreBlock* freeStoreBlockList;
40  std::uint32_t currentThread;
41  std::size_t allocated;
42  std::uint32_t numAllocatedBlocks;
43  std::size_t free;
44  std::uint32_t numFreeBlocks;
45  std::uint32_t compacted;
46  std::uint32_t batchDeallocateTlsSlot;
47  };
48  static_assert(sizeof(Store) == 0x2A0);
49  }
50 }
Definition: BSAtomic.h:65
Definition: CompactingStore.h:15
std::uint32_t numAllocatedBlocks
Definition: CompactingStore.h:42
bool ContainsBlockImpl(const void *a_block) const override
FreeBlock * smallFree[66]
Definition: CompactingStore.h:34
static constexpr auto RTTI
Definition: CompactingStore.h:17
std::uint32_t numFreeBlocks
Definition: CompactingStore.h:44
BlockHeader * lastBlock
Definition: CompactingStore.h:33
StoreBlock * storeBlockMin
Definition: CompactingStore.h:37
StoreBlock * nextStoreBlock
Definition: CompactingStore.h:38
void * allocEndMin
Definition: CompactingStore.h:30
void * storeEnd
Definition: CompactingStore.h:32
std::uint32_t batchDeallocateTlsSlot
Definition: CompactingStore.h:46
std::size_t allocated
Definition: CompactingStore.h:41
FreeBlock * nextMerge
Definition: CompactingStore.h:36
std::uint32_t compacted
Definition: CompactingStore.h:45
void * allocEnd
Definition: CompactingStore.h:31
std::size_t free
Definition: CompactingStore.h:43
FreeBlock * currentFree
Definition: CompactingStore.h:35
StoreBlock * freeStoreBlockList
Definition: CompactingStore.h:39
BSNonReentrantSpinLock lock
Definition: CompactingStore.h:28
void * allocBase
Definition: CompactingStore.h:29
std::uint32_t currentThread
Definition: CompactingStore.h:40
void GetMemoryStats(MemoryStats *a_stats) override
static constexpr auto VTABLE
Definition: CompactingStore.h:18
std::size_t Size(const void *a_block) const override
Definition: IMemoryStoreBase.h:20
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_CompactingStore__Store(static_cast< std::uint64_t >(690282))
constexpr std::array< REL::ID, 1 > VTABLE_CompactingStore__Store
Definition: Offsets_VTABLE.h:11159
Definition: IMemoryStoreBase.h:6