CommonLibSSE (Parapets fork)
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
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 bool ShouldTrySmallBlockPools (std::size_t a_size, MEM_CONTEXT a_context) override
 
virtual std::uint32_t GetPageSize () const override
 
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
 
- 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

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: