NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
eggHeap.hpp
1
#pragma once
2
#include <lib/rvl/mem/MEMHeapCommon.h>
3
#include <lib/egg/eggDisposer.hpp>
4
5
// [TODO: extend this]
6
7
namespace
EGG {
8
class
Allocator
;
9
class
FrmHeap
;
10
11
class
Heap : Disposer {
12
public
:
13
Heap() : mFlag(0) {}
14
Heap(
MEMiHeapHead
*heapHead);
15
virtual
~Heap();
16
virtual
int
getHeapKind()
const
= 0;
17
virtual
void
initAllocator(
Allocator
* allocator,
long
align) = 0;
18
virtual
void
*alloc(
size_t
,
long
) = 0;
19
virtual
void
free(
void
*) = 0;
20
virtual
void
destroy() = 0;
21
22
static
void
*alloc(
size_t
,
int
,
EGG::Heap
*);
23
static
void
free(
void
*,
EGG::Heap
*);
24
25
char
mPad1[0x8];
26
MEMiHeapHead
*mpHeapHandle;
27
void
*mpParentBlock;
28
Heap *mpParentHeap;
29
u16 mFlag;
30
u8 mPad2[0x18];
31
32
FrmHeap
*toFrmHeap() {
33
if
(
this
!=
nullptr
&& getHeapKind() == 2) {
34
return
(
FrmHeap
*)
this
;
35
}
36
return
nullptr
;
37
}
38
39
static
Heap *sCurrentHeap;
40
};
41
}
42
43
void
*
operator
new
(size_t,
void
*);
44
void
*
operator
new
(size_t, int);
45
void
*
operator
new
(size_t,
EGG::Heap
*, int);
46
void
*
operator
new
[](size_t,
EGG::Heap
*, int);
EGG::Allocator
Definition
allocator.hpp:7
EGG::FrmHeap
Definition
eggFrmHeap.hpp:9
EGG::Heap
Definition
eggHeap.hpp:11
MEMiHeapHead
Definition
MEMHeapCommon.h:11
include
lib
egg
heap
eggHeap.hpp
Made with ❤️ by
CLF78
and
RootCubed
. Logos by
Chasical
and
B1
. Website generated by
Doxygen
1.13.2