NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
mHeapAllocator_c Class Reference

#include <game/mLib/m_allocator.hpp>

Inheritance diagram for mHeapAllocator_c:
[legend]

Description

An allocator with some helper functions that manage the heap from which it allocates memory.

Definition at line 26 of file m_allocator.hpp.

Public Member Functions

 mHeapAllocator_c ()
 Constructs a new heap allocator.
virtual ~mHeapAllocator_c ()
 Destroys the heap allocator.
bool createFrmHeap (size_t size, EGG::Heap *parent, const char *name, ulong align, mHeap::AllocOptBit_t opt)
bool createFrmHeapToCurrent (size_t size, EGG::Heap *parent, const char *name, ulong align, mHeap::AllocOptBit_t opt)
void destroyHeap ()
 Destroys the underlying heap and replaces it with the dummy heap.
size_t adjustFrmHeap ()
size_t adjustFrmHeapRestoreCurrent ()
Public Member Functions inherited from mAllocator_c
 mAllocator_c ()
 Constructs a new allocator.
virtual ~mAllocator_c ()
 Destroys the allocator.
virtual void * alloc (size_t size)
virtual void free (void *ptr)
bool attach (EGG::Heap *heap, int alignment)

Additional Inherited Members

Static Public Member Functions inherited from mAllocator_c
static void init (EGG::Heap *heap)

Constructor & Destructor Documentation

◆ mHeapAllocator_c()

mHeapAllocator_c::mHeapAllocator_c ( )

Constructs a new heap allocator.

Definition at line 87 of file m_allocator.cpp.

◆ ~mHeapAllocator_c()

mHeapAllocator_c::~mHeapAllocator_c ( )
virtual

Destroys the heap allocator.

Definition at line 89 of file m_allocator.cpp.

Member Function Documentation

◆ createFrmHeap()

bool mHeapAllocator_c::createFrmHeap ( size_t size,
EGG::Heap * parent,
const char * name,
ulong align,
mHeap::AllocOptBit_t opt )

Definition at line 93 of file m_allocator.cpp.

◆ createFrmHeapToCurrent()

bool mHeapAllocator_c::createFrmHeapToCurrent ( size_t size,
EGG::Heap * parent,
const char * name,
ulong align,
mHeap::AllocOptBit_t opt )

Definition at line 122 of file m_allocator.cpp.

◆ destroyHeap()

void mHeapAllocator_c::destroyHeap ( )

Destroys the underlying heap and replaces it with the dummy heap.

Definition at line 104 of file m_allocator.cpp.

◆ adjustFrmHeap()

size_t mHeapAllocator_c::adjustFrmHeap ( )

Definition at line 112 of file m_allocator.cpp.

◆ adjustFrmHeapRestoreCurrent()

size_t mHeapAllocator_c::adjustFrmHeapRestoreCurrent ( )

Definition at line 132 of file m_allocator.cpp.