9 class HeapBlockFreeHead;
51 static_assert(
sizeof(
Row) == 0x20);
74 void BlockFree(
void* a_ptr, std::int32_t a_numBytes)
override;
75 void*
BufAlloc(std::int32_t& a_reqNumBytesInOut)
override;
76 void BufFree(
void* a_ptr, std::int32_t a_numBytes)
override;
77 void*
BufRealloc(
void* a_ptrOld, std::int32_t a_oldNumBytes, std::int32_t& a_reqNumBytesInOut)
override;
78 void BlockAllocBatch(
void** a_ptrsOut, std::int32_t a_numPtrs, std::int32_t a_blockSize)
override;
79 void BlockFreeBatch(
void** a_ptrsIn, std::int32_t a_numPtrs, std::int32_t a_blockSize)
override;
84 std::size_t
Size(
const void* a_block)
const override;
87 void*
Allocate(std::size_t a_size, std::uint32_t a_alignment)
override;
88 void Deallocate(
void* a_pointer, std::uint32_t)
override;
90 std::size_t
TotalSize(
const void* a_pointer)
const override;
#define KEEP_FOR_RE()
Definition: PCH.h:713
Definition: BSAtomic.h:49
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:108
HeapBlock * lastBlock
Definition: bhkThreadMemorySource.h:103
char * allocEnd
Definition: bhkThreadMemorySource.h:107
bool PointerInHeap(const void *a_pointer) const override
HeapBlockFreeHead * largeFreeTrees
Definition: bhkThreadMemorySource.h:101
char * addressSpaceEnd
Definition: bhkThreadMemorySource.h:110
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:115
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
static constexpr auto VTABLE
Definition: bhkThreadMemorySource.h:17
HeapBlock ** lists
Definition: bhkThreadMemorySource.h:100
bool allowDecommits
Definition: bhkThreadMemorySource.h:119
void BufFree(void *a_ptr, std::int32_t a_numBytes) override
std::uint32_t padD4
Definition: bhkThreadMemorySource.h:122
std::int32_t totalFreeBlockPages
Definition: bhkThreadMemorySource.h:114
std::int32_t addressSpaceSize
Definition: bhkThreadMemorySource.h:113
char * blockPageCommit
Definition: bhkThreadMemorySource.h:109
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:99
Row * rows
Definition: bhkThreadMemorySource.h:97
BSCriticalSection lock
Definition: bhkThreadMemorySource.h:96
void * memoryRoot
Definition: bhkThreadMemorySource.h:104
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:112
std::uint32_t GetPageSize() const override
char * blockStart
Definition: bhkThreadMemorySource.h:106
std::size_t TotalSize(const void *a_pointer) const override
std::int32_t totalBlocks
Definition: bhkThreadMemorySource.h:118
char * allocBase
Definition: bhkThreadMemorySource.h:105
std::int32_t totalFreeBlocks
Definition: bhkThreadMemorySource.h:117
void GetMemoryStatistics(MemoryStatistics &a_usage) override
std::uint16_t * smallRowIndexes
Definition: bhkThreadMemorySource.h:98
void * BufAlloc(std::int32_t &a_reqNumBytesInOut) override
std::int32_t totalAllocated
Definition: bhkThreadMemorySource.h:116
MegaBlockPage * megaBlockPageList
Definition: bhkThreadMemorySource.h:111
std::uint8_t padD1
Definition: bhkThreadMemorySource.h:120
HeapBlock * firstBlock
Definition: bhkThreadMemorySource.h:102
std::uint16_t padD2
Definition: bhkThreadMemorySource.h:121
void GetHeapStats(HeapStats *a_stats, bool a_fullBlockInfo) override
Definition: hkMemoryAllocator.h:8
Definition: AbsorbEffect.h:6
constexpr std::array< REL::ID, 2 > VTABLE_bhkThreadMemorySource
Definition: Offsets_VTABLE.h:13373
constexpr REL::ID RTTI_bhkThreadMemorySource(static_cast< std::uint64_t >(690931))
Definition: IMemoryHeap.h:10
Definition: IMemoryStoreBase.h:6
Definition: bhkThreadMemorySource.h:28
std::uint32_t pad1C
Definition: bhkThreadMemorySource.h:36
BlockPage * right
Definition: bhkThreadMemorySource.h:32
BlockPage * left
Definition: bhkThreadMemorySource.h:31
FreeBlock * blocks
Definition: bhkThreadMemorySource.h:33
std::uint16_t totalElem
Definition: bhkThreadMemorySource.h:34
std::uint16_t freeElem
Definition: bhkThreadMemorySource.h:35
Definition: bhkThreadMemorySource.h:20
FreeBlock * next
Definition: bhkThreadMemorySource.h:23
Definition: bhkThreadMemorySource.h:54
std::uint8_t pad1FFFFD
Definition: bhkThreadMemorySource.h:65
bool decommitted
Definition: bhkThreadMemorySource.h:64
BlockPage blockPages[255]
Definition: bhkThreadMemorySource.h:58
char mem[sizeof(BlockPage[255]) *256]
Definition: bhkThreadMemorySource.h:57
BlockPage * freeBlockPages
Definition: bhkThreadMemorySource.h:61
std::uint16_t pad1FFFFE
Definition: bhkThreadMemorySource.h:66
std::uint16_t nextBlockPageAlloc
Definition: bhkThreadMemorySource.h:63
std::uint16_t numFreeBlockPages
Definition: bhkThreadMemorySource.h:62
MegaBlockPage * left
Definition: bhkThreadMemorySource.h:59
MegaBlockPage * right
Definition: bhkThreadMemorySource.h:60
Definition: bhkThreadMemorySource.h:41
std::int32_t totalAllocatedBlocks
Definition: bhkThreadMemorySource.h:47
std::int32_t elemSize
Definition: bhkThreadMemorySource.h:49
BlockPage * pageList
Definition: bhkThreadMemorySource.h:44
BlockPage * currAlloc
Definition: bhkThreadMemorySource.h:45
std::int32_t totalFreeBlocks
Definition: bhkThreadMemorySource.h:46
std::int32_t totalBytes
Definition: bhkThreadMemorySource.h:48
Definition: hkMemoryAllocator.h:22