9 class HeapBlockFreeHead;
50 static_assert(
sizeof(
Row) == 0x20);
73 void BlockFree(
void* a_ptr, std::int32_t a_numBytes)
override;
74 void*
BufAlloc(std::int32_t& a_reqNumBytesInOut)
override;
75 void BufFree(
void* a_ptr, std::int32_t a_numBytes)
override;
76 void*
BufRealloc(
void* a_ptrOld, std::int32_t a_oldNumBytes, std::int32_t& a_reqNumBytesInOut)
override;
77 void BlockAllocBatch(
void** a_ptrsOut, std::int32_t a_numPtrs, std::int32_t a_blockSize)
override;
78 void BlockFreeBatch(
void** a_ptrsIn, std::int32_t a_numPtrs, std::int32_t a_blockSize)
override;
83 std::size_t
Size(
const void* a_block)
const override;
86 void*
Allocate(std::size_t a_size, std::uint32_t a_alignment)
override;
87 void Deallocate(
void* a_pointer, std::uint32_t)
override;
89 std::size_t
TotalSize(
const void* a_pointer)
const override;
Definition: HeapBlockFreeHead.h:8
Definition: HeapBlock.h:6
Definition: IMemoryHeap.h:31
Definition: bhkThreadMemorySource.h:14
void BlockAllocBatch(void **a_ptrsOut, std::int32_t a_numPtrs, std::int32_t a_blockSize) override
void * Allocate(std::size_t a_size, std::uint32_t a_alignment) override
char * commitEnd
Definition: bhkThreadMemorySource.h:107
HeapBlock * lastBlock
Definition: bhkThreadMemorySource.h:102
char * allocEnd
Definition: bhkThreadMemorySource.h:106
bool PointerInHeap(const void *a_pointer) const override
HeapBlockFreeHead * largeFreeTrees
Definition: bhkThreadMemorySource.h:100
char * addressSpaceEnd
Definition: bhkThreadMemorySource.h:109
void BlockFreeBatch(void **a_ptrsIn, std::int32_t a_numPtrs, std::int32_t a_blockSize) override
void BlockFree(void *a_ptr, std::int32_t a_numBytes) override
std::uint32_t usedRows
Definition: bhkThreadMemorySource.h:114
std::size_t Size(const void *a_block) const override
void Deallocate(void *a_pointer, std::uint32_t) override
~bhkThreadMemorySource() override
static constexpr auto RTTI
Definition: bhkThreadMemorySource.h:16
bool ShouldTrySmallBlockPools(std::size_t a_size, MEM_CONTEXT a_context) override
HeapBlock ** lists
Definition: bhkThreadMemorySource.h:99
bool allowDecommits
Definition: bhkThreadMemorySource.h:118
void BufFree(void *a_ptr, std::int32_t a_numBytes) override
std::uint32_t padD4
Definition: bhkThreadMemorySource.h:121
std::int32_t totalFreeBlockPages
Definition: bhkThreadMemorySource.h:113
std::int32_t addressSpaceSize
Definition: bhkThreadMemorySource.h:112
char * blockPageCommit
Definition: bhkThreadMemorySource.h:108
void * BufRealloc(void *a_ptrOld, std::int32_t a_oldNumBytes, std::int32_t &a_reqNumBytesInOut) override
void * BlockAlloc(std::int32_t a_numBytes) override
std::uint16_t * largeRowIndexes
Definition: bhkThreadMemorySource.h:98
Row * rows
Definition: bhkThreadMemorySource.h:96
BSCriticalSection lock
Definition: bhkThreadMemorySource.h:95
void * memoryRoot
Definition: bhkThreadMemorySource.h:103
void GetMemoryStats(MemoryStats *a_stats) override
const char * GetName() const override
std::int32_t GetAllocatedSize(const void *a_obj, std::int32_t a_numBytes) override
MegaBlockPage * currMegaBlockPageAlloc
Definition: bhkThreadMemorySource.h:111
std::uint32_t GetPageSize() const override
char * blockStart
Definition: bhkThreadMemorySource.h:105
std::size_t TotalSize(const void *a_pointer) const override
std::int32_t totalBlocks
Definition: bhkThreadMemorySource.h:117
char * allocBase
Definition: bhkThreadMemorySource.h:104
std::int32_t totalFreeBlocks
Definition: bhkThreadMemorySource.h:116
void GetMemoryStatistics(MemoryStatistics &a_usage) override
std::uint16_t * smallRowIndexes
Definition: bhkThreadMemorySource.h:97
void * BufAlloc(std::int32_t &a_reqNumBytesInOut) override
std::int32_t totalAllocated
Definition: bhkThreadMemorySource.h:115
MegaBlockPage * megaBlockPageList
Definition: bhkThreadMemorySource.h:110
std::uint8_t padD1
Definition: bhkThreadMemorySource.h:119
HeapBlock * firstBlock
Definition: bhkThreadMemorySource.h:101
std::uint16_t padD2
Definition: bhkThreadMemorySource.h:120
void GetHeapStats(HeapStats *a_stats, bool a_fullBlockInfo) override
Definition: hkMemoryAllocator.h:8
Definition: AbsorbEffect.h:6
constexpr REL::VariantID RTTI_bhkThreadMemorySource(690931, 398786, 0x1f691a8)
Definition: IMemoryHeap.h:10
Definition: IMemoryStoreBase.h:6
Definition: bhkThreadMemorySource.h:27
std::uint32_t pad1C
Definition: bhkThreadMemorySource.h:35
BlockPage * right
Definition: bhkThreadMemorySource.h:31
BlockPage * left
Definition: bhkThreadMemorySource.h:30
FreeBlock * blocks
Definition: bhkThreadMemorySource.h:32
std::uint16_t totalElem
Definition: bhkThreadMemorySource.h:33
std::uint16_t freeElem
Definition: bhkThreadMemorySource.h:34
Definition: bhkThreadMemorySource.h:19
FreeBlock * next
Definition: bhkThreadMemorySource.h:22
Definition: bhkThreadMemorySource.h:53
std::uint8_t pad1FFFFD
Definition: bhkThreadMemorySource.h:64
bool decommitted
Definition: bhkThreadMemorySource.h:63
BlockPage blockPages[255]
Definition: bhkThreadMemorySource.h:57
char mem[sizeof(BlockPage[255]) *256]
Definition: bhkThreadMemorySource.h:56
BlockPage * freeBlockPages
Definition: bhkThreadMemorySource.h:60
std::uint16_t pad1FFFFE
Definition: bhkThreadMemorySource.h:65
std::uint16_t nextBlockPageAlloc
Definition: bhkThreadMemorySource.h:62
std::uint16_t numFreeBlockPages
Definition: bhkThreadMemorySource.h:61
MegaBlockPage * left
Definition: bhkThreadMemorySource.h:58
MegaBlockPage * right
Definition: bhkThreadMemorySource.h:59
Definition: bhkThreadMemorySource.h:40
std::int32_t totalAllocatedBlocks
Definition: bhkThreadMemorySource.h:46
std::int32_t elemSize
Definition: bhkThreadMemorySource.h:48
BlockPage * pageList
Definition: bhkThreadMemorySource.h:43
BlockPage * currAlloc
Definition: bhkThreadMemorySource.h:44
std::int32_t totalFreeBlocks
Definition: bhkThreadMemorySource.h:45
std::int32_t totalBytes
Definition: bhkThreadMemorySource.h:47
Definition: hkMemoryAllocator.h:22