Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
JKRExpHeap Class Reference

#include <d_a_balloon_2D.h>

+ Inheritance diagram for JKRExpHeap:
+ Collaboration diagram for JKRExpHeap:

Classes

class  CMemBlock
 

Public Types

enum  EAllocMode { ALLOC_MODE_1 = 1 }
 

Public Member Functions

s32 getUsedSize (u8 groupId) const
 
s32 getTotalUsedSize (void) const
 
CMemBlockgetHeadUsedList () const
 
void setAllocationMode (EAllocMode mode)
 
virtual u32 getHeapType ()
 
virtual bool check ()
 
virtual bool dump_sort ()
 
virtual bool dump ()
 
virtual void do_destroy ()
 
virtual voiddo_alloc (u32 size, int alignment)
 
virtual void do_free (void *ptr)
 
virtual void do_freeAll ()
 
virtual void do_freeTail ()
 
virtual void do_fillFreeArea ()
 
virtual s32 do_resize (void *ptr, u32 size)
 
virtual s32 do_getSize (void *ptr)
 
virtual s32 do_getFreeSize ()
 
virtual voiddo_getMaxFreeBlock ()
 
virtual s32 do_getTotalFreeSize ()
 
virtual s32 do_changeGroupID (u8 newGroupID)
 
virtual u8 do_getCurrentGroupId ()
 
virtual void state_register (JKRHeap::TState *p, u32 id) const
 
virtual bool state_compare (JKRHeap::TState const &r1, JKRHeap::TState const &r2) const
 
- Public Member Functions inherited from JKRHeap
 JKRHeap (void *data, u32 size, JKRHeap *parent, bool errorFlag)
 
virtual ~JKRHeap ()
 
JKRHeapbecomeSystemHeap ()
 
JKRHeapbecomeCurrentHeap ()
 
void destroy ()
 
voidalloc (u32 size, int alignment)
 
void free (void *ptr)
 
void freeAll ()
 
void freeTail ()
 
s32 resize (void *ptr, u32 size)
 
s32 getSize (void *ptr)
 
s32 getFreeSize ()
 
voidgetMaxFreeBlock ()
 
s32 getTotalFreeSize ()
 
s32 changeGroupID (u8 newGroupId)
 
u32 getMaxAllocatableSize (int alignment)
 
JKRHeapfind (void *ptr) const
 
JKRHeapfindAllHeap (void *ptr) const
 
void dispose_subroutine (u32 start, u32 end)
 
bool dispose (void *ptr, u32 size)
 
void dispose (void *begin, void *end)
 
void dispose ()
 
bool setErrorFlag (bool errorFlag)
 
bool isSubHeap (JKRHeap *heap) const
 
virtual void callAllDisposer ()
 
virtual void state_dump (JKRHeap::TState const &p) const
 
void setDebugFill (bool debugFill)
 
bool getDebugFill () const
 
voidgetStartAddr () const
 
voidgetEndAddr () const
 
u32 getSize () const
 
bool getErrorFlag () const
 
void callErrorHandler (JKRHeap *heap, u32 size, int alignment)
 
JKRHeapgetParent () const
 
JSUTree< JKRHeap > & getHeapTree ()
 
void appendDisposer (JKRDisposer *disposer)
 
void removeDisposer (JKRDisposer *disposer)
 
void lock ()
 
void unlock ()
 
u32 getHeapSize ()
 
- Public Member Functions inherited from JKRDisposer
 JKRDisposer ()
 
virtual ~JKRDisposer ()
 

Static Public Member Functions

static JKRExpHeapcreateRoot (int maxHeaps, bool errorFlag)
 
static JKRExpHeapcreate (u32 size, JKRHeap *parent, bool errorFlag)
 
static JKRExpHeapcreate (void *ptr, u32 size, JKRHeap *parent, bool errorFlag)
 
- Static Public Member Functions inherited from JKRHeap
static bool initArena (char **memory, u32 *size, int maxHeaps)
 
static voidalloc (u32 size, int alignment, JKRHeap *heap)
 
static void free (void *ptr, JKRHeap *heap)
 
static s32 resize (void *ptr, u32 size, JKRHeap *heap)
 
static s32 getSize (void *ptr, JKRHeap *heap)
 
static JKRHeapfindFromRoot (void *ptr)
 
static void copyMemory (void *dst, void *src, u32 size)
 
static void fillMemory (void *dst, u32 size, u8 value)
 
static bool checkMemoryFilled (void *src, u32 size, u8 value)
 
static JKRErrorHandler setErrorHandler (JKRErrorHandler errorHandler)
 
static void setDefaultDebugFill (bool status)
 
static voidgetCodeStart (void)
 
static voidgetCodeEnd (void)
 
static voidgetUserRamStart (void)
 
static voidgetUserRamEnd (void)
 
static u32 getMemorySize (void)
 
static JKRHeapgetRootHeap ()
 
static JKRHeapgetRootHeap2 ()
 
static JKRHeapgetSystemHeap ()
 
static JKRHeapgetCurrentHeap ()
 
static void setSystemHeap (JKRHeap *heap)
 
static void setCurrentHeap (JKRHeap *heap)
 
static void setState_u32ID_ (TState *state, u32 id)
 
static void setState_uUsedSize_ (TState *state, u32 usedSize)
 
static void setState_u32CheckCode_ (TState *state, u32 checkCode)
 
static voidgetState_buf_ (TState *state)
 
static voidgetState_ (TState *state)
 

Public Attributes

u8 mAllocMode
 
u8 mCurrentGroupId
 
bool field_0x6e
 
- Public Attributes inherited from JKRDisposer
JKRHeapmHeap
 
JSULink< JKRDisposermLink
 

Protected Member Functions

 JKRExpHeap (void *data, u32 size, JKRHeap *parent, bool errorFlag)
 
virtual ~JKRExpHeap ()
 
voidallocFromHead (u32 size, int align)
 
voidallocFromHead (u32 size)
 
voidallocFromTail (u32 size, int align)
 
voidallocFromTail (u32 size)
 
void appendUsedList (CMemBlock *newblock)
 
void setFreeBlock (CMemBlock *block, CMemBlock *prev, CMemBlock *next)
 
void removeFreeBlock (CMemBlock *block)
 
void removeUsedBlock (CMemBlock *block)
 
void recycleFreeBlock (CMemBlock *block)
 
void joinTwoBlocks (CMemBlock *block)
 

Private Attributes

voidfield_0x70
 
u32 field_0x74
 
CMemBlockmHeadFreeList
 
CMemBlockmTailFreeList
 
CMemBlockmHeadUsedList
 
CMemBlockmTailUsedList
 

Friends

class CMemBlock
 

Additional Inherited Members

- Static Public Attributes inherited from JKRHeap
static voidmCodeStart
 
static voidmCodeEnd
 
static voidmUserRamStart
 
static voidmUserRamEnd
 
static u32 mMemorySize
 
static JKRHeapsRootHeap
 
static JKRHeapsRootHeap2
 
static JKRHeapsSystemHeap
 
static JKRHeapsCurrentHeap
 
static JKRErrorHandler mErrorHandler
 
- Protected Attributes inherited from JKRHeap
OSMutex mMutex
 
u8mStart
 
u8mEnd
 
u32 mSize
 
bool mDebugFill
 
bool mCheckMemoryFilled
 
u8 mAllocationMode
 
u8 mGroupId
 
JSUTree< JKRHeapmChildTree
 
JSUList< JKRDisposermDisposerList
 
bool mErrorFlag
 
bool mInitFlag
 
u8 padding_0x6a [2]
 

Member Enumeration Documentation

◆ EAllocMode

Enumerator
ALLOC_MODE_1 

Constructor & Destructor Documentation

◆ JKRExpHeap()

JKRExpHeap::JKRExpHeap ( void data,
u32  size,
JKRHeap parent,
bool  errorFlag 
)
protected

◆ ~JKRExpHeap()

JKRExpHeap::~JKRExpHeap ( )
protectedvirtual

Member Function Documentation

◆ allocFromHead() [1/2]

void * JKRExpHeap::allocFromHead ( u32  size)
protected

◆ allocFromHead() [2/2]

void * JKRExpHeap::allocFromHead ( u32  size,
int  align 
)
protected

◆ allocFromTail() [1/2]

void * JKRExpHeap::allocFromTail ( u32  size)
protected

◆ allocFromTail() [2/2]

void * JKRExpHeap::allocFromTail ( u32  size,
int  align 
)
protected

◆ appendUsedList()

void JKRExpHeap::appendUsedList ( JKRExpHeap::CMemBlock newblock)
protected

◆ check()

bool JKRExpHeap::check ( void  )
virtual

Implements JKRHeap.

◆ create() [1/2]

JKRExpHeap * JKRExpHeap::create ( u32  size,
JKRHeap parent,
bool  errorFlag 
)
static

◆ create() [2/2]

JKRExpHeap * JKRExpHeap::create ( void ptr,
u32  size,
JKRHeap parent,
bool  errorFlag 
)
static

◆ createRoot()

JKRExpHeap * JKRExpHeap::createRoot ( int  maxHeaps,
bool  errorFlag 
)
static

◆ do_alloc()

void * JKRExpHeap::do_alloc ( u32  size,
int  alignment 
)
virtual

Implements JKRHeap.

◆ do_changeGroupID()

s32 JKRExpHeap::do_changeGroupID ( u8  newGroupID)
virtual

Reimplemented from JKRHeap.

◆ do_destroy()

void JKRExpHeap::do_destroy ( void  )
virtual

Implements JKRHeap.

◆ do_fillFreeArea()

void JKRExpHeap::do_fillFreeArea ( void  )
virtual

Implements JKRHeap.

◆ do_free()

void JKRExpHeap::do_free ( void ptr)
virtual

Implements JKRHeap.

◆ do_freeAll()

void JKRExpHeap::do_freeAll ( void  )
virtual

Implements JKRHeap.

◆ do_freeTail()

void JKRExpHeap::do_freeTail ( void  )
virtual

Implements JKRHeap.

◆ do_getCurrentGroupId()

u8 JKRExpHeap::do_getCurrentGroupId ( void  )
virtual

Reimplemented from JKRHeap.

◆ do_getFreeSize()

s32 JKRExpHeap::do_getFreeSize ( void  )
virtual

Implements JKRHeap.

◆ do_getMaxFreeBlock()

void * JKRExpHeap::do_getMaxFreeBlock ( void  )
virtual

Implements JKRHeap.

◆ do_getSize()

s32 JKRExpHeap::do_getSize ( void ptr)
virtual

Implements JKRHeap.

◆ do_getTotalFreeSize()

s32 JKRExpHeap::do_getTotalFreeSize ( void  )
virtual

Implements JKRHeap.

◆ do_resize()

s32 JKRExpHeap::do_resize ( void ptr,
u32  size 
)
virtual

Implements JKRHeap.

◆ dump()

bool JKRExpHeap::dump ( void  )
virtual

Implements JKRHeap.

◆ dump_sort()

bool JKRExpHeap::dump_sort ( void  )
virtual

Reimplemented from JKRHeap.

◆ getHeadUsedList()

CMemBlock * JKRExpHeap::getHeadUsedList ( ) const
inline

◆ getHeapType()

u32 JKRExpHeap::getHeapType ( void  )
virtual

Implements JKRHeap.

◆ getTotalUsedSize()

s32 JKRExpHeap::getTotalUsedSize ( void  ) const

◆ getUsedSize()

s32 JKRExpHeap::getUsedSize ( u8  groupId) const

◆ joinTwoBlocks()

void JKRExpHeap::joinTwoBlocks ( CMemBlock block)
protected

◆ recycleFreeBlock()

void JKRExpHeap::recycleFreeBlock ( JKRExpHeap::CMemBlock block)
protected

◆ removeFreeBlock()

void JKRExpHeap::removeFreeBlock ( CMemBlock block)
protected

◆ removeUsedBlock()

void JKRExpHeap::removeUsedBlock ( JKRExpHeap::CMemBlock block)
protected

◆ setAllocationMode()

void JKRExpHeap::setAllocationMode ( EAllocMode  mode)
inline

◆ setFreeBlock()

void JKRExpHeap::setFreeBlock ( CMemBlock block,
CMemBlock prev,
CMemBlock next 
)
protected

◆ state_compare()

bool JKRExpHeap::state_compare ( JKRHeap::TState const r1,
JKRHeap::TState const r2 
) const
virtual

Reimplemented from JKRHeap.

◆ state_register()

void JKRExpHeap::state_register ( JKRHeap::TState p,
u32  id 
) const
virtual

Reimplemented from JKRHeap.

Friends And Related Symbol Documentation

◆ CMemBlock

Member Data Documentation

◆ field_0x6e

bool JKRExpHeap::field_0x6e

◆ field_0x70

void* JKRExpHeap::field_0x70
private

◆ field_0x74

u32 JKRExpHeap::field_0x74
private

◆ mAllocMode

u8 JKRExpHeap::mAllocMode

◆ mCurrentGroupId

u8 JKRExpHeap::mCurrentGroupId

◆ mHeadFreeList

CMemBlock* JKRExpHeap::mHeadFreeList
private

◆ mHeadUsedList

CMemBlock* JKRExpHeap::mHeadUsedList
private

◆ mTailFreeList

CMemBlock* JKRExpHeap::mTailFreeList
private

◆ mTailUsedList

CMemBlock* JKRExpHeap::mTailUsedList
private

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