CommonLibSSE (Parapets fork)
Loading...
Searching...
No Matches
RE::AbstractHeap Class Referenceabstract

#include <AbstractHeap.h>

Inheritance diagram for RE::AbstractHeap:
RE::IMemoryHeap RE::IMemoryStore RE::IMemoryStoreBase RE::MemoryHeap

Public Member Functions

virtual ~AbstractHeap ()
 
virtual void GetMemoryStats (MemoryStats *a_stats) override
 
virtual void * AllocateAlignImpl (std::size_t a_size, std::uint32_t a_alignment) override
 
virtual void * TryAllocateImpl (std::size_t a_size, std::uint32_t a_alignment) override
 
virtual const char * GetName () const override
 
virtual bool PointerInHeap (const void *a_pointer) const override
 
virtual void GetHeapStats (HeapStats *a_stats, bool a_fullBlockInfo) override
 
virtual bool ShouldTrySmallBlockPools (std::size_t a_size, MEM_CONTEXT a_context) override
 
virtual std::uint32_t GetPageSize () const override
 
virtual void * DoHeapAllocation (std::size_t a_size, std::size_t a_initialSize)=0
 
virtual void DoHeapFree (void *a_ptr)=0
 
virtual std::size_t CreateMorePages (void *a_memory, std::size_t a_currentSize, std::size_t a_requestedBytes)
 
virtual std::size_t CleanExtraPages (void *a_memory, std::size_t a_currentSize, std::size_t a_freeBytes)
 
virtual void DecommitPages (HeapBlock *a_block)
 
virtual void CommitPages (HeapBlock *, std::size_t)
 
- 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
 
virtual const char * GetName () const =0
 
virtual void * Allocate (std::size_t a_size, std::uint32_t a_alignment)=0
 
virtual void Deallocate (void *a_mem, std::uint32_t)=0
 
virtual bool PointerInHeap (const void *a_pointer) const =0
 
virtual std::size_t TotalSize (const void *a_pointer) const =0
 
virtual void GetHeapStats (HeapStats *a_stats, bool a_fullBlockInfo)=0
 
virtual bool ShouldTrySmallBlockPools (std::size_t a_size, MEM_CONTEXT a_context)=0
 
virtual std::uint32_t GetPageSize () const =0
 
- Public Member Functions inherited from RE::IMemoryStore
 ~IMemoryStore () override=default
 
virtual void * AllocateAlignImpl (std::size_t a_size, std::uint32_t a_alignment)=0
 
virtual void DeallocateAlignImpl (void *&a_block)=0
 
virtual void * TryAllocateImpl (std::size_t a_size, 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
 
virtual std::size_t Size (const void *a_mem) const =0
 
virtual void GetMemoryStats (MemoryStats *a_stats)=0
 
virtual bool ContainsBlockImpl (const void *a_block) const =0
 

Public Attributes

BSCriticalSection criticalSection
 
const char * name
 
std::size_t minFreeBlockSize
 
std::uint32_t pageSize
 
std::uint32_t pageSizeFlag
 
std::size_t memHeapSize
 
std::size_t initialSize
 
std::size_t currentSize
 
std::size_t wastedMemory
 
std::size_t memAllocated
 
std::size_t memAllocatedHigh
 
std::size_t blockMemAllocated
 
char * memHeap
 
std::int32_t numBlocks
 
std::uint32_t pad08C
 
HeapBlockblockHead
 
HeapBlockblockTail
 
std::int32_t numFreeBlocks
 
bool allowDecommits
 
bool supportsSwapping
 
std::uint16_t pad0A0
 
HeapBlocksmallFreeLists [32]
 
HeapBlockFreeHeadlargeFreeTrees [32]
 

Static Public Attributes

static constexpr auto RTTI = RTTI_AbstractHeap
 
- 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
 

Constructor & Destructor Documentation

◆ ~AbstractHeap()

virtual RE::AbstractHeap::~AbstractHeap ( )
virtual

Member Function Documentation

◆ AllocateAlignImpl()

virtual void * RE::AbstractHeap::AllocateAlignImpl ( std::size_t  a_size,
std::uint32_t  a_alignment 
)
overridevirtual

Implements RE::IMemoryStore.

◆ CleanExtraPages()

virtual std::size_t RE::AbstractHeap::CleanExtraPages ( void *  a_memory,
std::size_t  a_currentSize,
std::size_t  a_freeBytes 
)
virtual

Reimplemented in RE::MemoryHeap.

◆ CommitPages()

virtual void RE::AbstractHeap::CommitPages ( HeapBlock ,
std::size_t   
)
virtual

◆ CreateMorePages()

virtual std::size_t RE::AbstractHeap::CreateMorePages ( void *  a_memory,
std::size_t  a_currentSize,
std::size_t  a_requestedBytes 
)
virtual

Reimplemented in RE::MemoryHeap.

◆ DecommitPages()

virtual void RE::AbstractHeap::DecommitPages ( HeapBlock a_block)
virtual

Reimplemented in RE::MemoryHeap.

◆ DoHeapAllocation()

virtual void * RE::AbstractHeap::DoHeapAllocation ( std::size_t  a_size,
std::size_t  a_initialSize 
)
pure virtual

Implemented in RE::MemoryHeap.

◆ DoHeapFree()

virtual void RE::AbstractHeap::DoHeapFree ( void *  a_ptr)
pure virtual

Implemented in RE::MemoryHeap.

◆ GetHeapStats()

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

Implements RE::IMemoryHeap.

Reimplemented in RE::MemoryHeap.

◆ GetMemoryStats()

virtual void RE::AbstractHeap::GetMemoryStats ( MemoryStats a_stats)
overridevirtual

Implements RE::IMemoryStoreBase.

◆ GetName()

virtual const char * RE::AbstractHeap::GetName ( ) const
overridevirtual

Implements RE::IMemoryHeap.

◆ GetPageSize()

virtual std::uint32_t RE::AbstractHeap::GetPageSize ( ) const
overridevirtual

Implements RE::IMemoryHeap.

◆ PointerInHeap()

virtual bool RE::AbstractHeap::PointerInHeap ( const void *  a_pointer) const
overridevirtual

Implements RE::IMemoryHeap.

◆ ShouldTrySmallBlockPools()

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

Implements RE::IMemoryHeap.

◆ TryAllocateImpl()

virtual void * RE::AbstractHeap::TryAllocateImpl ( std::size_t  a_size,
std::uint32_t  a_alignment 
)
overridevirtual

Reimplemented from RE::IMemoryStore.

Member Data Documentation

◆ allowDecommits

bool RE::AbstractHeap::allowDecommits

◆ blockHead

HeapBlock* RE::AbstractHeap::blockHead

◆ blockMemAllocated

std::size_t RE::AbstractHeap::blockMemAllocated

◆ blockTail

HeapBlock* RE::AbstractHeap::blockTail

◆ criticalSection

BSCriticalSection RE::AbstractHeap::criticalSection

◆ currentSize

std::size_t RE::AbstractHeap::currentSize

◆ initialSize

std::size_t RE::AbstractHeap::initialSize

◆ largeFreeTrees

HeapBlockFreeHead* RE::AbstractHeap::largeFreeTrees[32]

◆ memAllocated

std::size_t RE::AbstractHeap::memAllocated

◆ memAllocatedHigh

std::size_t RE::AbstractHeap::memAllocatedHigh

◆ memHeap

char* RE::AbstractHeap::memHeap

◆ memHeapSize

std::size_t RE::AbstractHeap::memHeapSize

◆ minFreeBlockSize

std::size_t RE::AbstractHeap::minFreeBlockSize

◆ name

const char* RE::AbstractHeap::name

◆ numBlocks

std::int32_t RE::AbstractHeap::numBlocks

◆ numFreeBlocks

std::int32_t RE::AbstractHeap::numFreeBlocks

◆ pad08C

std::uint32_t RE::AbstractHeap::pad08C

◆ pad0A0

std::uint16_t RE::AbstractHeap::pad0A0

◆ pageSize

std::uint32_t RE::AbstractHeap::pageSize

◆ pageSizeFlag

std::uint32_t RE::AbstractHeap::pageSizeFlag

◆ RTTI

constexpr auto RE::AbstractHeap::RTTI = RTTI_AbstractHeap
inlinestaticconstexpr

◆ smallFreeLists

HeapBlock* RE::AbstractHeap::smallFreeLists[32]

◆ supportsSwapping

bool RE::AbstractHeap::supportsSwapping

◆ wastedMemory

std::size_t RE::AbstractHeap::wastedMemory

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