ExpHeap class
Base classes
- class Heap
Public types
- enum class AllocMode { FirstFit = 0, BestFit = 1 }
- enum class FindFreeBlockMode { Auto = 0, FromFreeList = 1, ByIteratingMemBlock = 2 }
- enum class FindMode { }
- using HeapList = OffsetList<Heap>
- using DisposerList = OffsetList<IDisposer>
- enum class HeapNullOption { AlwaysUseSpecifiedHeap = 0, UseSpecifiedOrContainHeap = 1, DoNotAppendDisposerIfNoHeapSpecified = 2, UseSpecifiedOrCurrentHeap = 3 }
- enum class NodeClassType { Reflexible = 0, Node = 1, Other = 2 }
- enum class AllocFlg { Name = 1u << 0u, Meta = 1u << 1u }
Public static functions
-
static auto create(size_
t size, const SafeString& name, Heap* parent, s32 alignment, HeapDirection direction, bool) -> ExpHeap* -
static auto create(void* address,
size_
t size, const SafeString& name, bool) -> ExpHeap* -
static auto tryCreate(size_
t size, const SafeString& name, Heap* parent, s32 alignment, HeapDirection direction, bool) -> ExpHeap* -
static auto tryCreate(void* address,
size_
t size, const SafeString& name, bool) -> ExpHeap* -
static auto getManagementAreaSize(s32) -> size_
t - static auto getListNodeOffset() -> u32
Constructors, destructors, conversion operators
Public functions
- void destroy() override
-
auto adjust() -> size_
t override -
auto tryAlloc(size_
t size, s32 alignment) -> void* override - void free(void* ptr) override
-
auto resizeFront(void* p_void,
size_
t size) -> void* override -
auto resizeBack(void* p_void,
size_
t size) -> void* override -
auto tryRealloc(void* ptr,
size_
t size, s32 alignment) -> void* override - void freeAll() override
- auto getStartAddress() const -> uintptr_t override
- auto getEndAddress() const -> uintptr_t override
-
auto getSize() const -> size_
t override -
auto getFreeSize() const -> size_
t override -
auto getMaxAllocatableSize(int alignment) const -> size_
t override - auto isInclude(const void* p_void) const -> bool override
- auto isEmpty() const -> bool override
- auto isFreeable() const -> bool override
- auto isResizable() const -> bool override
- auto isAdjustable() const -> bool override
- void dump() const override
- void dumpYAML(WriteStream& stream, int i) const override
- void genInformation_(hostio::Context* context) override
- auto destroyAndGetAllocatableSize(s32) -> s32 virtual
- void setFindFreeBlockMode(FindFreeBlockMode mode) virtual
- auto getAllocMode() const -> AllocMode
- void setAllocMode(AllocMode mode)
-
auto getAllocatedSize(void* object) -> size_
t - void dumpFreeList() const
- void dumpUseList() const
- void checkFreeList() const
- auto tryCheckFreeList() const -> bool
- void checkUseList() const
- auto tryCheckUseList() const -> bool
- void dumpTreeYAML(WriteStream& stream, int) const
- void makeMetaString_(BufferedSafeString*) virtual
- void pushBackChild_(Heap* child) virtual
- void appendDisposer_(IDisposer* disposer)
- void removeDisposer_(IDisposer* disposer)
- auto findContainHeap_(const void* ptr) -> Heap*
-
auto alloc(size_
t size, s32 alignment = sizeof(void*)) -> void* - void enableLock(bool on)
- void enableWarning(bool on)
- void enableDebugFillSystem(bool on)
- void enableDebugFillUser(bool on)
- auto isLockEnabled() const -> bool
- auto isWarningEnabled() const -> bool
- auto isDebugFillSystemEnabled() const -> bool
- auto isDebugFillUserEnabled() const -> bool
-
auto getCriticalSection() -> sead::
CriticalSection& - auto getName() const -> const SafeString&
- void setName(const SafeString& name)
- auto getNodeClassType() const -> NodeClassType virtual
Public variables
- void* mStart
-
size_
t mSize - Heap* mParent
- HeapList mChildren
- ListNode mListNode
- DisposerList mDisposerList
- HeapDirection mDirection
- CriticalSection mCS
- BitFlag16 mFlag
- u16 mHeapCheckTag
Protected static functions
- static void doCreate(ExpHeap*, Heap*)
- static void createMaxSizeFreeMemBlock_(ExpHeap*)
- static auto compareMemBlockAddr_(const MemBlock*, const MemBlock*) -> s32
Protected functions
-
auto findFreeMemBlockFromHead_(size_
t, FindMode) const -> MemBlock* -
auto findFreeMemBlockFromHead_(size_
t, s32, FindMode) const -> MemBlock* -
auto findFreeMemBlockFromTail_(size_
t, FindMode) const -> MemBlock* -
auto findFreeMemBlockFromTail_(size_
t, s32, FindMode) const -> MemBlock* - auto findLastMemBlockIfFree_() -> MemBlock*
- auto findFirstMemBlockIfFree_() -> MemBlock*
- void pushToUseList_(MemBlock*)
- void pushToFreeList_(MemBlock*)
-
auto adjustBack_() -> size_
t -
auto adjustFront_() -> size_
t -
auto allocFromHead_(size_
t) -> MemBlock* -
auto allocFromHead_(size_
t, s32) -> MemBlock* -
auto allocFromTail_(size_
t) -> MemBlock* -
auto allocFromTail_(size_
t, s32) -> MemBlock* - auto getDisposerHeap_() const -> Heap*
Protected variables
Enum documentation
enum class sead:: ExpHeap:: HeapNullOption
#include <heap/seadDisposer.h>
enum class sead:: ExpHeap:: NodeClassType
#include <hostio/seadHostIOReflexible.h>
| Enumerators | |
|---|---|
| Reflexible | |
| Node | |
| Other |
Other classes. |
enum class sead:: ExpHeap:: AllocFlg
#include <hostio/seadHostIOReflexible.h>
Typedef documentation
using sead:: ExpHeap:: HeapList = OffsetList<Heap>
#include <heap/seadHeap.h>
using sead:: ExpHeap:: DisposerList = OffsetList<IDisposer>
#include <heap/seadHeap.h>
Function documentation
static u32 sead:: ExpHeap:: getListNodeOffset()
#include <heap/seadDisposer.h>
sead:: ExpHeap:: SEAD_ENUM(Flag,
cEnableLock,
cDisposing,
cEnableWarning,
cEnableDebugFillSystem,
cEnableDebugFillUser) enum HeapDirection
#include <heap/seadHeap.h>
void sead:: ExpHeap:: dumpTreeYAML(WriteStream& stream,
int) const
#include <heap/seadHeap.h>
void sead:: ExpHeap:: makeMetaString_(BufferedSafeString*) virtual
#include <heap/seadHeap.h>
void sead:: ExpHeap:: pushBackChild_(Heap* child) virtual
#include <heap/seadHeap.h>
void sead:: ExpHeap:: appendDisposer_(IDisposer* disposer)
#include <heap/seadHeap.h>
void sead:: ExpHeap:: removeDisposer_(IDisposer* disposer)
#include <heap/seadHeap.h>
Heap* sead:: ExpHeap:: findContainHeap_(const void* ptr)
#include <heap/seadHeap.h>
void* sead:: ExpHeap:: alloc(size_ t size,
s32 alignment = sizeof(void*))
#include <heap/seadHeap.h>
void sead:: ExpHeap:: enableLock(bool on)
#include <heap/seadHeap.h>
void sead:: ExpHeap:: enableWarning(bool on)
#include <heap/seadHeap.h>
void sead:: ExpHeap:: enableDebugFillSystem(bool on)
#include <heap/seadHeap.h>
void sead:: ExpHeap:: enableDebugFillUser(bool on)
#include <heap/seadHeap.h>
bool sead:: ExpHeap:: isLockEnabled() const
#include <heap/seadHeap.h>
bool sead:: ExpHeap:: isWarningEnabled() const
#include <heap/seadHeap.h>
bool sead:: ExpHeap:: isDebugFillSystemEnabled() const
#include <heap/seadHeap.h>
bool sead:: ExpHeap:: isDebugFillUserEnabled() const
#include <heap/seadHeap.h>
sead:: CriticalSection& sead:: ExpHeap:: getCriticalSection()
#include <heap/seadHeap.h>
const SafeString& sead:: ExpHeap:: getName() const
#include <prim/seadNamable.h>
void sead:: ExpHeap:: setName(const SafeString& name)
#include <prim/seadNamable.h>
NodeClassType sead:: ExpHeap:: getNodeClassType() const virtual
#include <hostio/seadHostIOReflexible.h>
Heap* sead:: ExpHeap:: getDisposerHeap_() const protected
#include <heap/seadDisposer.h>
Variable documentation
void* sead:: ExpHeap:: mStart
#include <heap/seadHeap.h>
size_ t sead:: ExpHeap:: mSize
#include <heap/seadHeap.h>
Heap* sead:: ExpHeap:: mParent
#include <heap/seadHeap.h>
HeapList sead:: ExpHeap:: mChildren
#include <heap/seadHeap.h>
ListNode sead:: ExpHeap:: mListNode
#include <heap/seadHeap.h>
DisposerList sead:: ExpHeap:: mDisposerList
#include <heap/seadHeap.h>
HeapDirection sead:: ExpHeap:: mDirection
#include <heap/seadHeap.h>
CriticalSection sead:: ExpHeap:: mCS
#include <heap/seadHeap.h>
BitFlag16 sead:: ExpHeap:: mFlag
#include <heap/seadHeap.h>
u16 sead:: ExpHeap:: mHeapCheckTag
#include <heap/seadHeap.h>