Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
JKRAramHeap.h
Go to the documentation of this file.
1#ifndef JKRARAMHEAP_H
2#define JKRARAMHEAP_H
3
7
12class JKRAramHeap : public JKRDisposer {
13public:
15 HEAD = 0,
16 TAIL = 1,
17 };
18
19public:
20 // TODO: fix type
22
24 virtual ~JKRAramHeap();
25
29 u32 getFreeSize(void);
31 // u32 getUsedSize(void);
32 void dump(void);
34 delete block;
35 }
36
37 u8 getCurrentGroupID() const { return mGroupId; }
38
39 JKRHeap* getMgrHeap() const { return mHeap; }
40
41private:
42 void lock() { OSLockMutex(&mMutex); }
43
45
46public:
47 /* 0x00 */ // vtable
48 /* 0x04 */ // JKRDisposer
49 /* 0x18 */ OSMutex mMutex;
50 /* 0x30 */ JKRHeap* mHeap;
51 /* 0x34 */ u32 mHeadAddress;
52 /* 0x38 */ u32 mTailAddress;
53 /* 0x3C */ u32 mSize;
54 /* 0x40 */ u8 mGroupId;
55 /* 0x41 */ u8 padding_0x41[3];
56};
57
58#endif /* JKRARAMHEAP_H */
void OSUnlockMutex(OSMutex *mutex)
Definition OSMutex.c:88
void OSLockMutex(OSMutex *mutex)
Definition OSMutex.c:62
Definition JKRAramBlock.h:12
Definition JKRAramHeap.h:12
EAllocMode
Definition JKRAramHeap.h:14
@ HEAD
Definition JKRAramHeap.h:15
@ TAIL
Definition JKRAramHeap.h:16
static JSUList< JKRAramBlock > sAramList
Definition JKRAramHeap.h:21
u8 padding_0x41[3]
Definition JKRAramHeap.h:55
u32 mSize
Definition JKRAramHeap.h:53
JKRHeap * mHeap
Definition JKRAramHeap.h:50
u32 getTotalFreeSize(void)
Definition JKRAramHeap.cpp:118
u8 getCurrentGroupID() const
Definition JKRAramHeap.h:37
OSMutex mMutex
Definition JKRAramHeap.h:49
u8 mGroupId
Definition JKRAramHeap.h:54
JKRHeap * getMgrHeap() const
Definition JKRAramHeap.h:39
void lock()
Definition JKRAramHeap.h:42
u32 mHeadAddress
Definition JKRAramHeap.h:51
JKRAramBlock * alloc(u32, EAllocMode)
Definition JKRAramHeap.cpp:33
virtual ~JKRAramHeap()
Definition JKRAramHeap.cpp:23
JKRAramBlock * allocFromHead(u32)
Definition JKRAramHeap.cpp:48
void dump(void)
Definition JKRAramHeap.cpp:134
void free(JKRAramBlock *block)
Definition JKRAramHeap.h:33
void unlock()
Definition JKRAramHeap.h:44
JKRAramBlock * allocFromTail(u32)
Definition JKRAramHeap.cpp:77
u32 getFreeSize(void)
Definition JKRAramHeap.cpp:99
u32 mTailAddress
Definition JKRAramHeap.h:52
Definition JKRDisposer.h:12
Definition JKRHeap.h:16
Definition JSUList.h:96
static u8 block[48]
Definition fstload.c:39
Definition OSMutex.h:10
unsigned long u32
Definition types.h:10
unsigned char u8
Definition types.h:8