Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
JKRSolidHeap.h
Go to the documentation of this file.
1#ifndef JKRSOLIDHEAP_H
2#define JKRSOLIDHEAP_H
3
5
10class JKRSolidHeap : public JKRHeap {
11public:
19
20protected:
21 JKRSolidHeap(void*, u32, JKRHeap*, bool);
22 virtual ~JKRSolidHeap();
23
24 void* allocFromHead(u32, int);
25 void* allocFromTail(u32, int);
26
27 static s32 getUsedSize(JKRSolidHeap* heap) { return heap->mSize - heap->getTotalFreeSize(); }
28
29public:
30 /* vt[04] */ virtual u32 getHeapType(void); /* override */
31 /* vt[05] */ virtual bool check(void); /* override */
32
33 /* vt[07] */ virtual bool dump(void); /* override */
34 /* vt[08] */ virtual void do_destroy(void); /* override */
35 /* vt[09] */ virtual void* do_alloc(u32, int); /* override */
36 /* vt[10] */ virtual void do_free(void*); /* override */
37 /* vt[11] */ virtual void do_freeAll(void); /* override */
38 /* vt[12] */ virtual void do_freeTail(void); /* override */
39 /* vt[13] */ virtual void do_fillFreeArea(void); /* override */
40 /* vt[14] */ virtual s32 do_resize(void*, u32); /* override */
41 /* vt[15] */ virtual s32 do_getSize(void*); /* override */
42 /* vt[16] */ virtual s32 do_getFreeSize(void); /* override */
43 /* vt[17] */ virtual void* do_getMaxFreeBlock(void); /* override */
44 /* vt[18] */ virtual s32 do_getTotalFreeSize(void); /* override */
45
46 /* vt[21] */ virtual void state_register(JKRHeap::TState*, u32) const; /* override */
47 /* vt[22] */ virtual bool state_compare(JKRHeap::TState const&,
48 JKRHeap::TState const&) const; /* override */
49
50private:
51 /* 0x00 */ // vtable
52 /* 0x04 */ // JKRHeap
53 /* 0x6C */ u32 mFreeSize;
54 /* 0x70 */ u8* mSolidHead;
55 /* 0x74 */ u8* mSolidTail;
56 /* 0x78 */ Unknown* field_0x78;
57
58public:
59 s32 adjustSize(void);
60
61 static JKRSolidHeap* create(u32, JKRHeap*, bool);
62};
63
67
68#endif /* JKRSOLIDHEAP_H */
JKRSolidHeap * JKRCreateSolidHeap(u32 param_0, JKRHeap *heap, bool param_2)
Definition JKRSolidHeap.h:64
T cLib_calcTimer(T *value)
Definition c_lib.h:74
Definition JKRHeap.h:18
Definition JKRHeap.h:16
s32 getTotalFreeSize()
Definition JKRHeap.cpp:253
u32 mSize
Definition JKRHeap.h:117
Definition JKRSolidHeap.h:10
static JKRSolidHeap * create(u32, JKRHeap *, bool)
Definition JKRSolidHeap.cpp:7
u8 * mSolidHead
Definition JKRSolidHeap.h:54
virtual void * do_alloc(u32, int)
Definition JKRSolidHeap.cpp:79
virtual bool dump(void)
Definition JKRSolidHeap.cpp:231
virtual void do_freeTail(void)
Definition JKRSolidHeap.cpp:173
virtual s32 do_getFreeSize(void)
Definition JKRSolidHeap.cpp:285
virtual void state_register(JKRHeap::TState *, u32) const
Definition JKRSolidHeap.cpp:250
virtual bool state_compare(JKRHeap::TState const &, JKRHeap::TState const &) const
Definition JKRSolidHeap.cpp:264
virtual void do_destroy(void)
Definition JKRSolidHeap.cpp:32
s32 adjustSize(void)
Definition JKRSolidHeap.cpp:56
Unknown * field_0x78
Definition JKRSolidHeap.h:56
virtual ~JKRSolidHeap()
Definition JKRSolidHeap.cpp:51
virtual bool check(void)
Definition JKRSolidHeap.cpp:213
virtual void do_freeAll(void)
Definition JKRSolidHeap.cpp:160
virtual void do_free(void *)
Definition JKRSolidHeap.cpp:155
void * allocFromHead(u32, int)
Definition JKRSolidHeap.cpp:114
virtual s32 do_resize(void *, u32)
Definition JKRSolidHeap.cpp:201
virtual s32 do_getSize(void *)
Definition JKRSolidHeap.cpp:207
u32 mFreeSize
Definition JKRSolidHeap.h:53
virtual u32 getHeapType(void)
Definition JKRSolidHeap.cpp:280
void * allocFromTail(u32, int)
Definition JKRSolidHeap.cpp:136
virtual void * do_getMaxFreeBlock(void)
Definition JKRSolidHeap.cpp:290
virtual s32 do_getTotalFreeSize(void)
Definition JKRSolidHeap.cpp:295
virtual void do_fillFreeArea(void)
Definition JKRSolidHeap.cpp:194
u8 * mSolidTail
Definition JKRSolidHeap.h:55
static s32 getUsedSize(JKRSolidHeap *heap)
Definition JKRSolidHeap.h:27
Definition JKRSolidHeap.h:12
u32 field_0x8
Definition JKRSolidHeap.h:15
Unknown * mNext
Definition JKRSolidHeap.h:17
u32 field_0x4
Definition JKRSolidHeap.h:14
void * field_0xc
Definition JKRSolidHeap.h:16
u32 field_0x0
Definition JKRSolidHeap.h:13
unsigned long u32
Definition types.h:10
signed long s32
Definition types.h:6
unsigned char u8
Definition types.h:8