CommonLibSSE (Parapets fork)
Loading...
Searching...
No Matches
RE::ScrapHeap Class Reference

#include <ScrapHeap.h>

Inheritance diagram for RE::ScrapHeap:
RE::IMemoryStore RE::IMemoryStoreBase

Classes

struct  Block
 
struct  FreeBlock
 
struct  FreeTreeNode
 

Public Member Functions

 ~ScrapHeap () override
 
std::size_t Size (void const *a_mem) const override
 
void GetMemoryStats (MemoryStats *) override
 
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
 
void * Allocate (std::size_t a_size, std::size_t a_alignment)
 
void Deallocate (void *a_mem)
 
- 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

FreeBlocksmallBlocks [6] { nullptr }
 
FreeTreeNodefreeList { nullptr }
 
BlocklastBlock { nullptr }
 
void * baseAddress { nullptr }
 
void * endAddress { nullptr }
 
void * commitEnd { nullptr }
 
std::size_t reserveSize { 1 << 26 }
 
std::size_t minCommit { 1 << 17 }
 
std::size_t totalAllocated { 0 }
 
std::uint32_t keepPagesRequest { 0 }
 
std::uint32_t totalFreeBlocks { 0 }
 
std::uint32_t freeSmallBlocks { 0 }
 
std::uint32_t totalAllocatedBlocks { 0 }
 
std::uint32_t pmpBarrier { 0 }
 

Static Public Attributes

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

◆ ~ScrapHeap()

RE::ScrapHeap::~ScrapHeap ( )
inlineoverride

Member Function Documentation

◆ Allocate()

void * RE::ScrapHeap::Allocate ( std::size_t  a_size,
std::size_t  a_alignment 
)

◆ AllocateAlignImpl()

void * RE::ScrapHeap::AllocateAlignImpl ( std::size_t  a_size,
std::uint32_t  a_alignment 
)
inlineoverridevirtual

Implements RE::IMemoryStore.

◆ ContainsBlockImpl()

bool RE::ScrapHeap::ContainsBlockImpl ( const void *  a_block) const
inlineoverridevirtual

Implements RE::IMemoryStoreBase.

◆ Deallocate()

void RE::ScrapHeap::Deallocate ( void *  a_mem)

◆ DeallocateAlignImpl()

void RE::ScrapHeap::DeallocateAlignImpl ( void *&  a_block)
inlineoverridevirtual

Implements RE::IMemoryStore.

◆ GetMemoryStats()

void RE::ScrapHeap::GetMemoryStats ( MemoryStats )
inlineoverridevirtual

Implements RE::IMemoryStoreBase.

◆ Size()

std::size_t RE::ScrapHeap::Size ( void const *  a_mem) const
inlineoverridevirtual

Implements RE::IMemoryStoreBase.

Member Data Documentation

◆ baseAddress

void* RE::ScrapHeap::baseAddress { nullptr }

◆ commitEnd

void* RE::ScrapHeap::commitEnd { nullptr }

◆ endAddress

void* RE::ScrapHeap::endAddress { nullptr }

◆ freeList

FreeTreeNode* RE::ScrapHeap::freeList { nullptr }

◆ freeSmallBlocks

std::uint32_t RE::ScrapHeap::freeSmallBlocks { 0 }

◆ keepPagesRequest

std::uint32_t RE::ScrapHeap::keepPagesRequest { 0 }

◆ lastBlock

Block* RE::ScrapHeap::lastBlock { nullptr }

◆ minCommit

std::size_t RE::ScrapHeap::minCommit { 1 << 17 }

◆ pmpBarrier

std::uint32_t RE::ScrapHeap::pmpBarrier { 0 }

◆ reserveSize

std::size_t RE::ScrapHeap::reserveSize { 1 << 26 }

◆ RTTI

constexpr auto RE::ScrapHeap::RTTI = RTTI_ScrapHeap
inlinestaticconstexpr

◆ smallBlocks

FreeBlock* RE::ScrapHeap::smallBlocks[6] { nullptr }

◆ totalAllocated

std::size_t RE::ScrapHeap::totalAllocated { 0 }

◆ totalAllocatedBlocks

std::uint32_t RE::ScrapHeap::totalAllocatedBlocks { 0 }

◆ totalFreeBlocks

std::uint32_t RE::ScrapHeap::totalFreeBlocks { 0 }

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