CommonLibSSE (Parapets fork)
RE::GMemoryHeap Class Referenceabstract

#include <GMemoryHeap.h>

Inheritance diagram for RE::GMemoryHeap:
RE::GListNode< GMemoryHeap > RE::GMemoryHeapPT

Classes

struct  HeapDesc
 
struct  HeapInfo
 
struct  HeapTracer
 
struct  HeapVisitor
 
struct  LimitHandler
 
struct  RootHeapDesc
 
struct  RootHeapParameters
 
struct  RootStats
 

Public Types

enum class  MemReportType {
  kBrief , kSummary , kMedium , kFull ,
  kSimple , kSimpleBrief , kFileSummary , kHeapsOnly
}
 
enum class  HeapFlags {
  kNone = 0 , kThreadUnsafe = 1 << 0 , kFastTinyBlocks = 1 << 1 , kFixedGranularity = 1 << 2 ,
  kRoot = 1 << 3 , kNoDebugInfo = 1 << 4 , kUserDebug = 1 << 12
}
 

Public Member Functions

virtual void CreateArena (UPInt a_arena, GSysAllocPaged *a_sysAlloc)=0
 
virtual void DestroyArena (UPInt a_arena)=0
 
virtual bool ArenaIsEmpty (UPInt a_arena)=0
 
virtual GMemoryHeapCreateHeap (const char *a_name, const HeapDesc &a_desc)=0
 
virtual void SetLimitHandler (LimitHandler *handler)=0
 
virtual void SetLimit (UPInt newLimit)=0
 
virtual void AddRef ()=0
 
virtual void Release ()=0
 
virtual void * Alloc (UPInt a_size)=0
 
virtual void * Alloc (UPInt a_size, UPInt a_align)=0
 
virtual void * Realloc (void *a_oldPtr, UPInt a_newSize)=0
 
virtual void Free (void *a_ptr)=0
 
virtual void * AllocAutoHeap (const void *a_this, UPInt a_size)=0
 
virtual void * AllocAutoHeap (const void *a_this, UPInt a_size, UPInt a_align)=0
 
virtual GMemoryHeapGetAllocHeap (const void *a_this)=0
 
virtual UPInt GetUsableSize (const void *a_ptr)=0
 
virtual void * AllocSysDirect (UPInt a_size)=0
 
virtual void FreeSysDirect (void *a_ptr, UPInt a_size)=0
 
virtual bool GetStats (GStatBag *a_bag)=0
 
virtual UPInt GetFootprint () const =0
 
virtual UPInt GetTotalFootprint () const =0
 
virtual UPInt GetUsedSpace () const =0
 
virtual UPInt GetTotalUsedSpace () const =0
 
virtual void GetRootStats (RootStats *a_stats)=0
 
virtual void VisitMem (GHeapMemVisitor *a_visitor, std::uint32_t a_flags)=0
 
virtual void VisitRootSegments (GHeapSegVisitor *a_visitor)=0
 
virtual void VisitHeapSegments (GHeapSegVisitor *a_visitor) const =0
 
virtual void SetTracer (HeapTracer *a_tracer)=0
 
GMemoryHeapCreateHeap (const char *a_name, HeapFlags a_flags=HeapFlags::kNone, UPInt a_minAlign=16, UPInt a_granularity=16 *1024, UPInt a_reserve=16 *1024, UPInt a_threshold=UPINT_MAX, UPInt a_limit=0, GHeapID a_heapID=GHeapID::kReserved, UPInt a_arena=0)
 
void GetHeapInfo (HeapInfo *a_info) const
 
const char * GetName () const
 
GHeapID GetID () const
 
GMemoryHeapGetParentHeap () const
 
HeapFlags GetFlags () const
 
UPInt GetGranularity () const
 
UPInt GetLimit () const
 
bool IsThreadSafe () const
 
void ReleaseOnFree (void *a_ptr)
 
void AssignToCurrentThread ()
 
bool DumpMemoryLeaks ()
 
void UltimateCheck ()
 
void CheckIntegrity ()
 
- Public Member Functions inherited from RE::GListNode< GMemoryHeap >
 GListNode ()
 
void Remove ()
 

Protected Types

using ChildListType = GList< GMemoryHeap >
 

Protected Member Functions

virtual ~GMemoryHeap ()
 
virtual void DestroyItself ()=0
 
virtual void UltimateCheck_Internal ()=0
 
virtual void ReleaseCachedMem ()=0
 
virtual bool DumpMemoryLeaks_Internal ()=0
 
virtual void CheckIntegrity_Internal () const =0
 
virtual void GetUserDebugStats (RootStats *a_stats) const =0
 

Protected Attributes

UPInt _selfSize
 
volatile std::uint32_t _refCount
 
std::uint32_t _pad24
 
UPInt _ownerThreadID
 
void * _autoRelease
 
HeapInfo _info
 
ChildListType _childHeaps
 
GLock _heapLock
 
bool _useLocks
 
bool _trackDebugInfo
 
std::uint16_t _padC2
 
std::uint32_t _padC4
 

Friends

class GMemoryHeapPT
 
class GMemoryHeapMH
 
class GHeapRoot
 
class GHeapRootMH
 

Additional Inherited Members

- Public Attributes inherited from RE::GListNode< GMemoryHeap >
GListNode< GMemoryHeap > * prev
 
GListNode< GMemoryHeap > * next
 

Member Typedef Documentation

◆ ChildListType

Member Enumeration Documentation

◆ HeapFlags

Enumerator
kNone 
kThreadUnsafe 
kFastTinyBlocks 
kFixedGranularity 
kRoot 
kNoDebugInfo 
kUserDebug 

◆ MemReportType

Enumerator
kBrief 
kSummary 
kMedium 
kFull 
kSimple 
kSimpleBrief 
kFileSummary 
kHeapsOnly 

Constructor & Destructor Documentation

◆ ~GMemoryHeap()

virtual RE::GMemoryHeap::~GMemoryHeap ( )
protectedvirtual

Member Function Documentation

◆ AddRef()

virtual void RE::GMemoryHeap::AddRef ( )
pure virtual

◆ Alloc() [1/2]

virtual void* RE::GMemoryHeap::Alloc ( UPInt  a_size)
pure virtual

◆ Alloc() [2/2]

virtual void* RE::GMemoryHeap::Alloc ( UPInt  a_size,
UPInt  a_align 
)
pure virtual

◆ AllocAutoHeap() [1/2]

virtual void* RE::GMemoryHeap::AllocAutoHeap ( const void *  a_this,
UPInt  a_size 
)
pure virtual

◆ AllocAutoHeap() [2/2]

virtual void* RE::GMemoryHeap::AllocAutoHeap ( const void *  a_this,
UPInt  a_size,
UPInt  a_align 
)
pure virtual

◆ AllocSysDirect()

virtual void* RE::GMemoryHeap::AllocSysDirect ( UPInt  a_size)
pure virtual

◆ ArenaIsEmpty()

virtual bool RE::GMemoryHeap::ArenaIsEmpty ( UPInt  a_arena)
pure virtual

◆ AssignToCurrentThread()

void RE::GMemoryHeap::AssignToCurrentThread ( )

◆ CheckIntegrity()

void RE::GMemoryHeap::CheckIntegrity ( )

◆ CheckIntegrity_Internal()

virtual void RE::GMemoryHeap::CheckIntegrity_Internal ( ) const
protectedpure virtual

◆ CreateArena()

virtual void RE::GMemoryHeap::CreateArena ( UPInt  a_arena,
GSysAllocPaged a_sysAlloc 
)
pure virtual

◆ CreateHeap() [1/2]

virtual GMemoryHeap* RE::GMemoryHeap::CreateHeap ( const char *  a_name,
const HeapDesc a_desc 
)
pure virtual

◆ CreateHeap() [2/2]

GMemoryHeap* RE::GMemoryHeap::CreateHeap ( const char *  a_name,
HeapFlags  a_flags = HeapFlags::kNone,
UPInt  a_minAlign = 16,
UPInt  a_granularity = 16 *1024,
UPInt  a_reserve = 16 *1024,
UPInt  a_threshold = UPINT_MAX,
UPInt  a_limit = 0,
GHeapID  a_heapID = GHeapID::kReserved,
UPInt  a_arena = 0 
)

◆ DestroyArena()

virtual void RE::GMemoryHeap::DestroyArena ( UPInt  a_arena)
pure virtual

◆ DestroyItself()

virtual void RE::GMemoryHeap::DestroyItself ( )
protectedpure virtual

◆ DumpMemoryLeaks()

bool RE::GMemoryHeap::DumpMemoryLeaks ( )

◆ DumpMemoryLeaks_Internal()

virtual bool RE::GMemoryHeap::DumpMemoryLeaks_Internal ( )
protectedpure virtual

◆ Free()

virtual void RE::GMemoryHeap::Free ( void *  a_ptr)
pure virtual

◆ FreeSysDirect()

virtual void RE::GMemoryHeap::FreeSysDirect ( void *  a_ptr,
UPInt  a_size 
)
pure virtual

◆ GetAllocHeap()

virtual GMemoryHeap* RE::GMemoryHeap::GetAllocHeap ( const void *  a_this)
pure virtual

◆ GetFlags()

HeapFlags RE::GMemoryHeap::GetFlags ( ) const

◆ GetFootprint()

virtual UPInt RE::GMemoryHeap::GetFootprint ( ) const
pure virtual

◆ GetGranularity()

UPInt RE::GMemoryHeap::GetGranularity ( ) const

◆ GetHeapInfo()

void RE::GMemoryHeap::GetHeapInfo ( HeapInfo a_info) const

◆ GetID()

GHeapID RE::GMemoryHeap::GetID ( ) const

◆ GetLimit()

UPInt RE::GMemoryHeap::GetLimit ( ) const

◆ GetName()

const char* RE::GMemoryHeap::GetName ( ) const

◆ GetParentHeap()

GMemoryHeap* RE::GMemoryHeap::GetParentHeap ( ) const

◆ GetRootStats()

virtual void RE::GMemoryHeap::GetRootStats ( RootStats a_stats)
pure virtual

◆ GetStats()

virtual bool RE::GMemoryHeap::GetStats ( GStatBag *  a_bag)
pure virtual

◆ GetTotalFootprint()

virtual UPInt RE::GMemoryHeap::GetTotalFootprint ( ) const
pure virtual

◆ GetTotalUsedSpace()

virtual UPInt RE::GMemoryHeap::GetTotalUsedSpace ( ) const
pure virtual

◆ GetUsableSize()

virtual UPInt RE::GMemoryHeap::GetUsableSize ( const void *  a_ptr)
pure virtual

◆ GetUsedSpace()

virtual UPInt RE::GMemoryHeap::GetUsedSpace ( ) const
pure virtual

◆ GetUserDebugStats()

virtual void RE::GMemoryHeap::GetUserDebugStats ( RootStats a_stats) const
protectedpure virtual

◆ IsThreadSafe()

bool RE::GMemoryHeap::IsThreadSafe ( ) const

◆ Realloc()

virtual void* RE::GMemoryHeap::Realloc ( void *  a_oldPtr,
UPInt  a_newSize 
)
pure virtual

◆ Release()

virtual void RE::GMemoryHeap::Release ( )
pure virtual

◆ ReleaseCachedMem()

virtual void RE::GMemoryHeap::ReleaseCachedMem ( )
protectedpure virtual

◆ ReleaseOnFree()

void RE::GMemoryHeap::ReleaseOnFree ( void *  a_ptr)

◆ SetLimit()

virtual void RE::GMemoryHeap::SetLimit ( UPInt  newLimit)
pure virtual

◆ SetLimitHandler()

virtual void RE::GMemoryHeap::SetLimitHandler ( LimitHandler handler)
pure virtual

◆ SetTracer()

virtual void RE::GMemoryHeap::SetTracer ( HeapTracer a_tracer)
pure virtual

◆ UltimateCheck()

void RE::GMemoryHeap::UltimateCheck ( )

◆ UltimateCheck_Internal()

virtual void RE::GMemoryHeap::UltimateCheck_Internal ( )
protectedpure virtual

◆ VisitHeapSegments()

virtual void RE::GMemoryHeap::VisitHeapSegments ( GHeapSegVisitor *  a_visitor) const
pure virtual

◆ VisitMem()

virtual void RE::GMemoryHeap::VisitMem ( GHeapMemVisitor *  a_visitor,
std::uint32_t  a_flags 
)
pure virtual

◆ VisitRootSegments()

virtual void RE::GMemoryHeap::VisitRootSegments ( GHeapSegVisitor *  a_visitor)
pure virtual

Friends And Related Function Documentation

◆ GHeapRoot

friend class GHeapRoot
friend

◆ GHeapRootMH

friend class GHeapRootMH
friend

◆ GMemoryHeapMH

friend class GMemoryHeapMH
friend

◆ GMemoryHeapPT

friend class GMemoryHeapPT
friend

Member Data Documentation

◆ _autoRelease

void* RE::GMemoryHeap::_autoRelease
protected

◆ _childHeaps

ChildListType RE::GMemoryHeap::_childHeaps
protected

◆ _heapLock

GLock RE::GMemoryHeap::_heapLock
mutableprotected

◆ _info

HeapInfo RE::GMemoryHeap::_info
protected

◆ _ownerThreadID

UPInt RE::GMemoryHeap::_ownerThreadID
protected

◆ _pad24

std::uint32_t RE::GMemoryHeap::_pad24
protected

◆ _padC2

std::uint16_t RE::GMemoryHeap::_padC2
protected

◆ _padC4

std::uint32_t RE::GMemoryHeap::_padC4
protected

◆ _refCount

volatile std::uint32_t RE::GMemoryHeap::_refCount
protected

◆ _selfSize

UPInt RE::GMemoryHeap::_selfSize
protected

◆ _trackDebugInfo

bool RE::GMemoryHeap::_trackDebugInfo
protected

◆ _useLocks

bool RE::GMemoryHeap::_useLocks
protected

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