CommonLibSSE NG
Loading...
Searching...
No Matches
RE::MemoryHeap Class Reference

#include <MemoryHeap.h>

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

Public Member Functions

 ~MemoryHeap () override
 
std::size_t Size (const void *a_block) const override
 
void * Allocate (std::size_t a_size, std::uint32_t a_alignment) override
 
void Deallocate (void *a_pointer, std::uint32_t) override
 
std::size_t TotalSize (const void *a_pointer) const override
 
void GetHeapStats (HeapStats *a_stats, bool a_fullBlockInfo) override
 
void * DoHeapAllocation (std::size_t a_size, std::size_t a_initialSize) override
 
void DoHeapFree (void *a_ptr) override
 
std::size_t CreateMorePages (void *a_memory, std::size_t a_currentSize, std::size_t a_requestedBytes) override
 
std::size_t CleanExtraPages (void *a_memory, std::size_t a_currentSize, std::size_t a_freeBytes) override
 
void DecommitPages (HeapBlock *a_block) override
 
- Public Member Functions inherited from RE::AbstractHeap
 ~AbstractHeap () override
 
void GetMemoryStats (MemoryStats *a_stats) override
 
void * AllocateAlignImpl (std::size_t a_size, std::uint32_t a_alignment) override
 
void * TryAllocateImpl (std::size_t a_size, std::uint32_t a_alignment) override
 
const char * GetName () const override
 
bool PointerInHeap (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
 
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

bool deletingHeap
 
std::uint8_t pad2A9
 
std::uint16_t pad2AA
 
std::uint32_t pad2AC
 
- Public Attributes inherited from RE::AbstractHeap
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_MemoryHeap
 
- Static Public Attributes inherited from RE::AbstractHeap
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

◆ ~MemoryHeap()

RE::MemoryHeap::~MemoryHeap ( )
override

Member Function Documentation

◆ Allocate()

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

Implements RE::IMemoryHeap.

◆ CleanExtraPages()

std::size_t RE::MemoryHeap::CleanExtraPages ( void *  a_memory,
std::size_t  a_currentSize,
std::size_t  a_freeBytes 
)
overridevirtual

Reimplemented from RE::AbstractHeap.

◆ CreateMorePages()

std::size_t RE::MemoryHeap::CreateMorePages ( void *  a_memory,
std::size_t  a_currentSize,
std::size_t  a_requestedBytes 
)
overridevirtual

Reimplemented from RE::AbstractHeap.

◆ Deallocate()

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

Implements RE::IMemoryHeap.

◆ DecommitPages()

void RE::MemoryHeap::DecommitPages ( HeapBlock a_block)
overridevirtual

Reimplemented from RE::AbstractHeap.

◆ DoHeapAllocation()

void * RE::MemoryHeap::DoHeapAllocation ( std::size_t  a_size,
std::size_t  a_initialSize 
)
overridevirtual

Implements RE::AbstractHeap.

◆ DoHeapFree()

void RE::MemoryHeap::DoHeapFree ( void *  a_ptr)
overridevirtual

Implements RE::AbstractHeap.

◆ GetHeapStats()

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

Reimplemented from RE::AbstractHeap.

◆ Size()

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

Implements RE::IMemoryStoreBase.

◆ TotalSize()

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

Implements RE::IMemoryHeap.

Member Data Documentation

◆ deletingHeap

bool RE::MemoryHeap::deletingHeap

◆ pad2A9

std::uint8_t RE::MemoryHeap::pad2A9

◆ pad2AA

std::uint16_t RE::MemoryHeap::pad2AA

◆ pad2AC

std::uint32_t RE::MemoryHeap::pad2AC

◆ RTTI

constexpr auto RE::MemoryHeap::RTTI = RTTI_MemoryHeap
inlinestaticconstexpr

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