#include <ExpHeap.hh>
Low-level implementation of a memory heap for managing dynamic memory allocation. Allocation may occur anywhere within the memory space the heap is created from.
Due to requesting chunks from a provided memory block, internal fragmentation is non-existent, but external fragmentation is still possible. Allocating temporary blocks from the tail, and scene-permanent blocks from the head, is recommended. The memory overhead per allocation is sizeof(MEMiExpBlockHead). 
Definition at line 72 of file ExpHeap.hh.
| Public Types | |
| typedef std::function< void(void *, MEMiHeapHead *, uintptr_t)> | Visitor | 
|  Public Types inherited from Abstract::Memory::MEMiHeapHead | |
| enum class | FillType { NoUse = 0 , Alloc = 1 , Free = 2 } | 
| enum class | eOptFlag { ZeroFillAlloc = 0 , DebugFillAlloc = 1 } | 
| typedef EGG::TBitFlag< u16, eOptFlag > | OptFlag | 
| Public Member Functions | |
| void | destroy () | 
| void * | alloc (size_t size, s32 align) | 
| void | free (void *block) | 
| u32 | getAllocatableSize (s32 align) const | 
| void | visitAllocated (Visitor visitor, uintptr_t param) | 
| u16 | getGroupID () const | 
| void | setGroupID (u16 groupID) | 
|  Public Member Functions inherited from Abstract::Memory::MEMiHeapHead | |
| MEMList & | getChildList () | 
| void * | getHeapStart () | 
| void * | getHeapEnd () | 
| Static Public Member Functions | |
| static MEMiExpHeapHead * | create (void *startAddress, size_t size, u16 flag) | 
|  Static Public Member Functions inherited from Abstract::Memory::MEMiHeapHead | |
| static MEMList & | getRootList () | 
| static u32 | getFillVal (FillType type) | 
| static MEMiHeapHead * | findContainHeap (const void *block) | 
| static constexpr u16 | getLinkOffset () | 
| Private Types | |
| enum class | eAttribute { BestFitAlloc = 0 } | 
| typedef EGG::TBitFlag< u16, eAttribute > | Attribute | 
| Private Member Functions | |
| MEMiExpHeapHead (void *end, u16 opt) | |
| void * | allocFromHead (size_t size, s32 alignment) | 
| void * | allocFromTail (size_t size, s32 alignment) | 
| void * | allocUsedBlockFromFreeBlock (MEMiExpBlockHead *block, void *address, u32 size, s32 direction) | 
| bool | recycleRegion (const Region &initialRegion) | 
| Private Attributes | |
| MEMiExpBlockList | m_freeBlocks | 
| MEMiExpBlockList | m_usedBlocks | 
| u16 | m_groupId | 
| Attribute | m_attribute | 
| Static Private Attributes | |
| static constexpr u32 | EXP_HEAP_SIGNATURE = 0x45585048 | 
| Additional Inherited Members | |
|  Protected Member Functions inherited from Abstract::Memory::MEMiHeapHead | |
| MEMiHeapHead (u32 signature, void *heapStart, void *heapEnd, const OptFlag &opt) | |
| void | fillNoUseMemory (void *address, u32 size) | 
| void | fillAllocMemory (void *address, u32 size) | 
| void | fillFreeMemory (void *address, u32 size) | 
| 
 | private | 
Definition at line 95 of file ExpHeap.hh.
| std::function<void(void *, MEMiHeapHead *, uintptr_t)> Abstract::Memory::MEMiExpHeapHead::Visitor | 
Definition at line 78 of file ExpHeap.hh.
| 
 | strongprivate | 
Definition at line 92 of file ExpHeap.hh.
| 
 | private | 
Definition at line 91 of file ExpHeap.cc.
| 
 | 0x80198D88 | 
Definition at line 137 of file ExpHeap.cc.
| 
 | nodiscardprivate0x8019899C | 
Definition at line 214 of file ExpHeap.cc.
| 
 | nodiscardprivate0x80198A78 | 
Definition at line 250 of file ExpHeap.cc.
| 
 | nodiscardprivate0x80198798 | 
Definition at line 286 of file ExpHeap.cc.
| 
 | static0x80198CA8 | 
Definition at line 112 of file ExpHeap.cc.
| void Abstract::Memory::MEMiExpHeapHead::destroy | ( | ) | 
Definition at line 132 of file ExpHeap.cc.
| 
 | 0x80199038 | 
Definition at line 154 of file ExpHeap.cc.
Definition at line 168 of file ExpHeap.cc.
| 
 | nodiscard0x8019934C | 
Definition at line 204 of file ExpHeap.cc.
| 
 | private | 
Definition at line 330 of file ExpHeap.cc.
| 
 | 0x80199258 | 
Definition at line 209 of file ExpHeap.cc.
| 
 | 0x801992A8 | 
Definition at line 195 of file ExpHeap.cc.
| 
 | staticconstexprprivate | 
Definition at line 111 of file ExpHeap.hh.
| 
 | private | 
Definition at line 109 of file ExpHeap.hh.
| 
 | private | 
Definition at line 103 of file ExpHeap.hh.
| 
 | private | 
Definition at line 105 of file ExpHeap.hh.
| 
 | private | 
Definition at line 104 of file ExpHeap.hh.