CommonLibSSE (Parapets fork)
RE::bhkThreadMemorySource Class Reference

#include <bhkThreadMemorySource.h>

Inheritance diagram for RE::bhkThreadMemorySource:
RE::hkMemoryAllocator RE::IMemoryHeap RE::IMemoryStore RE::IMemoryStoreBase

Classes

struct  BlockPage
 
struct  FreeBlock
 
struct  MegaBlockPage
 
struct  Row
 

Public Member Functions

 ~bhkThreadMemorySource () override
 
void * BlockAlloc (std::int32_t a_numBytes) override
 
void BlockFree (void *a_ptr, std::int32_t a_numBytes) override
 
void * BufAlloc (std::int32_t &a_reqNumBytesInOut) override
 
void BufFree (void *a_ptr, std::int32_t a_numBytes) override
 
void * BufRealloc (void *a_ptrOld, std::int32_t a_oldNumBytes, std::int32_t &a_reqNumBytesInOut) override
 
void BlockAllocBatch (void **a_ptrsOut, std::int32_t a_numPtrs, std::int32_t a_blockSize) override
 
void BlockFreeBatch (void **a_ptrsIn, std::int32_t a_numPtrs, std::int32_t a_blockSize) override
 
void GetMemoryStatistics (MemoryStatistics &a_usage) override
 
std::int32_t GetAllocatedSize (const void *a_obj, std::int32_t a_numBytes) override
 
std::size_t Size (const void *a_block) const override
 
void GetMemoryStats (MemoryStats *a_stats) override
 
const char * GetName () const override
 
void * Allocate (std::size_t a_size, std::uint32_t a_alignment) override
 
void Deallocate (void *a_pointer, std::uint32_t) override
 
bool PointerInHeap (const void *a_pointer) const override
 
std::size_t TotalSize (const void *a_pointer) const override
 
void GetHeapStats (HeapStats *a_stats, bool a_fullBlockInfo) override
 
bool ShouldTrySmallBlockPools (std::size_t a_size, MEM_CONTEXT a_context) override
 
std::uint32_t GetPageSize () const override
 
- Public Member Functions inherited from RE::hkMemoryAllocator
virtual ~hkMemoryAllocator ()
 
virtual void ResetPeakMemoryStatistics ()
 
- Public Member Functions inherited from RE::IMemoryHeap
 ~IMemoryHeap () override=default
 
bool ContainsBlockImpl (const void *a_block) const override
 
void * AllocateAlignImpl (std::size_t a_size, std::uint32_t a_alignment) override
 
void DeallocateAlignImpl (void *&a_block) override
 
- Public Member Functions inherited from RE::IMemoryStore
 ~IMemoryStore () override=default
 
virtual void * TryAllocateImpl ([[maybe_unused]] std::size_t a_size, [[maybe_unused]] std::uint32_t a_alignment)
 
void * AllocateAlign (std::size_t a_size, std::uint32_t a_alignment)
 
void DeallocateAlign (void *&a_freeBlock)
 
- Public Member Functions inherited from RE::IMemoryStoreBase
virtual ~IMemoryStoreBase ()=default
 

Public Attributes

BSCriticalSection lock
 
Rowrows
 
std::uint16_t * smallRowIndexes
 
std::uint16_t * largeRowIndexes
 
HeapBlock ** lists
 
HeapBlockFreeHeadlargeFreeTrees
 
HeapBlockfirstBlock
 
HeapBlocklastBlock
 
void * memoryRoot
 
char * allocBase
 
char * blockStart
 
char * allocEnd
 
char * commitEnd
 
char * blockPageCommit
 
char * addressSpaceEnd
 
MegaBlockPagemegaBlockPageList
 
MegaBlockPagecurrMegaBlockPageAlloc
 
std::int32_t addressSpaceSize
 
std::int32_t totalFreeBlockPages
 
std::uint32_t usedRows
 
std::int32_t totalAllocated
 
std::int32_t totalFreeBlocks
 
std::int32_t totalBlocks
 
bool allowDecommits
 
std::uint8_t padD1
 
std::uint16_t padD2
 
std::uint32_t padD4
 

Static Public Attributes

static constexpr auto RTTI = RTTI_bhkThreadMemorySource
 
- Static Public Attributes inherited from RE::hkMemoryAllocator
static constexpr auto RTTI = RTTI_hkMemoryAllocator
 
- Static Public Attributes inherited from RE::IMemoryHeap
static constexpr auto RTTI = RTTI_IMemoryHeap
 
- Static Public Attributes inherited from RE::IMemoryStore
static constexpr auto RTTI = RTTI_IMemoryStore
 
- Static Public Attributes inherited from RE::IMemoryStoreBase
static constexpr auto RTTI = RTTI_IMemoryStoreBase
 

Additional Inherited Members

- Public Types inherited from RE::hkMemoryAllocator
enum class  MemoryState { kOK , kOutOfMemory }
 
using MemoryWalkCallback = void(void *a_start, std::size_t a_size, bool a_allocated, std::int32_t a_pool, void *a_param)
 

Constructor & Destructor Documentation

◆ ~bhkThreadMemorySource()

RE::bhkThreadMemorySource::~bhkThreadMemorySource ( )
override

Member Function Documentation

◆ Allocate()

void* RE::bhkThreadMemorySource::Allocate ( std::size_t  a_size,
std::uint32_t  a_alignment 
)
overridevirtual

Implements RE::IMemoryHeap.

◆ BlockAlloc()

void* RE::bhkThreadMemorySource::BlockAlloc ( std::int32_t  a_numBytes)
overridevirtual

Implements RE::hkMemoryAllocator.

◆ BlockAllocBatch()

void RE::bhkThreadMemorySource::BlockAllocBatch ( void **  a_ptrsOut,
std::int32_t  a_numPtrs,
std::int32_t  a_blockSize 
)
overridevirtual

Reimplemented from RE::hkMemoryAllocator.

◆ BlockFree()

void RE::bhkThreadMemorySource::BlockFree ( void *  a_ptr,
std::int32_t  a_numBytes 
)
overridevirtual

Implements RE::hkMemoryAllocator.

◆ BlockFreeBatch()

void RE::bhkThreadMemorySource::BlockFreeBatch ( void **  a_ptrsIn,
std::int32_t  a_numPtrs,
std::int32_t  a_blockSize 
)
overridevirtual

Reimplemented from RE::hkMemoryAllocator.

◆ BufAlloc()

void* RE::bhkThreadMemorySource::BufAlloc ( std::int32_t &  a_reqNumBytesInOut)
overridevirtual

Reimplemented from RE::hkMemoryAllocator.

◆ BufFree()

void RE::bhkThreadMemorySource::BufFree ( void *  a_ptr,
std::int32_t  a_numBytes 
)
overridevirtual

Reimplemented from RE::hkMemoryAllocator.

◆ BufRealloc()

void* RE::bhkThreadMemorySource::BufRealloc ( void *  a_ptrOld,
std::int32_t  a_oldNumBytes,
std::int32_t &  a_reqNumBytesInOut 
)
overridevirtual

Reimplemented from RE::hkMemoryAllocator.

◆ Deallocate()

void RE::bhkThreadMemorySource::Deallocate ( void *  a_pointer,
std::uint32_t   
)
overridevirtual

Implements RE::IMemoryHeap.

◆ GetAllocatedSize()

std::int32_t RE::bhkThreadMemorySource::GetAllocatedSize ( const void *  a_obj,
std::int32_t  a_numBytes 
)
overridevirtual

Implements RE::hkMemoryAllocator.

◆ GetHeapStats()

void RE::bhkThreadMemorySource::GetHeapStats ( HeapStats a_stats,
bool  a_fullBlockInfo 
)
overridevirtual

Implements RE::IMemoryHeap.

◆ GetMemoryStatistics()

void RE::bhkThreadMemorySource::GetMemoryStatistics ( MemoryStatistics a_usage)
overridevirtual

Implements RE::hkMemoryAllocator.

◆ GetMemoryStats()

void RE::bhkThreadMemorySource::GetMemoryStats ( MemoryStats a_stats)
overridevirtual

Implements RE::IMemoryStoreBase.

◆ GetName()

const char* RE::bhkThreadMemorySource::GetName ( ) const
overridevirtual

Implements RE::IMemoryHeap.

◆ GetPageSize()

std::uint32_t RE::bhkThreadMemorySource::GetPageSize ( ) const
overridevirtual

Implements RE::IMemoryHeap.

◆ PointerInHeap()

bool RE::bhkThreadMemorySource::PointerInHeap ( const void *  a_pointer) const
overridevirtual

Implements RE::IMemoryHeap.

◆ ShouldTrySmallBlockPools()

bool RE::bhkThreadMemorySource::ShouldTrySmallBlockPools ( std::size_t  a_size,
MEM_CONTEXT  a_context 
)
overridevirtual

Implements RE::IMemoryHeap.

◆ Size()

std::size_t RE::bhkThreadMemorySource::Size ( const void *  a_block) const
overridevirtual

Implements RE::IMemoryStoreBase.

◆ TotalSize()

std::size_t RE::bhkThreadMemorySource::TotalSize ( const void *  a_pointer) const
overridevirtual

Implements RE::IMemoryHeap.

Member Data Documentation

◆ addressSpaceEnd

char* RE::bhkThreadMemorySource::addressSpaceEnd

◆ addressSpaceSize

std::int32_t RE::bhkThreadMemorySource::addressSpaceSize

◆ allocBase

char* RE::bhkThreadMemorySource::allocBase

◆ allocEnd

char* RE::bhkThreadMemorySource::allocEnd

◆ allowDecommits

bool RE::bhkThreadMemorySource::allowDecommits

◆ blockPageCommit

char* RE::bhkThreadMemorySource::blockPageCommit

◆ blockStart

char* RE::bhkThreadMemorySource::blockStart

◆ commitEnd

char* RE::bhkThreadMemorySource::commitEnd

◆ currMegaBlockPageAlloc

MegaBlockPage* RE::bhkThreadMemorySource::currMegaBlockPageAlloc

◆ firstBlock

HeapBlock* RE::bhkThreadMemorySource::firstBlock

◆ largeFreeTrees

HeapBlockFreeHead* RE::bhkThreadMemorySource::largeFreeTrees

◆ largeRowIndexes

std::uint16_t* RE::bhkThreadMemorySource::largeRowIndexes

◆ lastBlock

HeapBlock* RE::bhkThreadMemorySource::lastBlock

◆ lists

HeapBlock** RE::bhkThreadMemorySource::lists

◆ lock

BSCriticalSection RE::bhkThreadMemorySource::lock

◆ megaBlockPageList

MegaBlockPage* RE::bhkThreadMemorySource::megaBlockPageList

◆ memoryRoot

void* RE::bhkThreadMemorySource::memoryRoot

◆ padD1

std::uint8_t RE::bhkThreadMemorySource::padD1

◆ padD2

std::uint16_t RE::bhkThreadMemorySource::padD2

◆ padD4

std::uint32_t RE::bhkThreadMemorySource::padD4

◆ rows

Row* RE::bhkThreadMemorySource::rows

◆ RTTI

constexpr auto RE::bhkThreadMemorySource::RTTI = RTTI_bhkThreadMemorySource
inlinestaticconstexpr

◆ smallRowIndexes

std::uint16_t* RE::bhkThreadMemorySource::smallRowIndexes

◆ totalAllocated

std::int32_t RE::bhkThreadMemorySource::totalAllocated

◆ totalBlocks

std::int32_t RE::bhkThreadMemorySource::totalBlocks

◆ totalFreeBlockPages

std::int32_t RE::bhkThreadMemorySource::totalFreeBlockPages

◆ totalFreeBlocks

std::int32_t RE::bhkThreadMemorySource::totalFreeBlocks

◆ usedRows

std::uint32_t RE::bhkThreadMemorySource::usedRows

The documentation for this class was generated from the following file: