CommonLibSSE NG
Loading...
Searching...
No Matches
CompactingStore.h
Go to the documentation of this file.
1#pragma once
2
3#include "RE/B/BSAtomic.h"
5
6namespace 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
19 ~Store() override; // 00
20
21 // override (IMemoryStoreBase)
22 std::size_t Size(const void* a_block) const override; // 01
23 void GetMemoryStats(MemoryStats* a_stats) override; // 02
24 bool ContainsBlockImpl(const void* a_block) const override; // 03
25
26 // members
28 void* allocBase;
30 void* allocEnd;
31 void* storeEnd;
32 BlockHeader* lastBlock;
33 FreeBlock* smallFree[66];
34 FreeBlock* currentFree;
35 FreeBlock* nextMerge;
36 StoreBlock* storeBlockMin;
37 StoreBlock* nextStoreBlock;
38 StoreBlock* freeStoreBlockList;
39 std::uint32_t currentThread;
40 std::size_t allocated;
41 std::uint32_t numAllocatedBlocks;
42 std::size_t free;
43 std::uint32_t numFreeBlocks;
44 std::uint32_t compacted;
46 };
47 static_assert(sizeof(Store) == 0x2A0);
48 }
49}
Definition BSAtomic.h:22
Definition CompactingStore.h:15
std::uint32_t numAllocatedBlocks
Definition CompactingStore.h:41
bool ContainsBlockImpl(const void *a_block) const override
FreeBlock * smallFree[66]
Definition CompactingStore.h:33
static constexpr auto RTTI
Definition CompactingStore.h:17
std::uint32_t numFreeBlocks
Definition CompactingStore.h:43
BlockHeader * lastBlock
Definition CompactingStore.h:32
StoreBlock * storeBlockMin
Definition CompactingStore.h:36
StoreBlock * nextStoreBlock
Definition CompactingStore.h:37
void * allocEndMin
Definition CompactingStore.h:29
void * storeEnd
Definition CompactingStore.h:31
std::uint32_t batchDeallocateTlsSlot
Definition CompactingStore.h:45
std::size_t allocated
Definition CompactingStore.h:40
FreeBlock * nextMerge
Definition CompactingStore.h:35
std::uint32_t compacted
Definition CompactingStore.h:44
void * allocEnd
Definition CompactingStore.h:30
std::size_t free
Definition CompactingStore.h:42
FreeBlock * currentFree
Definition CompactingStore.h:34
StoreBlock * freeStoreBlockList
Definition CompactingStore.h:38
BSNonReentrantSpinLock lock
Definition CompactingStore.h:27
void * allocBase
Definition CompactingStore.h:28
std::uint32_t currentThread
Definition CompactingStore.h:39
void GetMemoryStats(MemoryStats *a_stats) override
std::size_t Size(const void *a_block) const override
Definition IMemoryStoreBase.h:20
Definition AbsorbEffect.h:6
constexpr REL::VariantID RTTI_CompactingStore__Store(690282, 398139, 0x1f5f4f8)
Definition IMemoryStoreBase.h:6