mirror of https://github.com/zeldaret/tp.git
countUsed OK
This commit is contained in:
parent
f12c5050f3
commit
d8fdc85090
|
|
@ -57,6 +57,7 @@ protected:
|
|||
public:
|
||||
s32 getUsedSize(u8) const;
|
||||
s32 getTotalUsedSize(void) const;
|
||||
CMemBlock* getHeadUsedList() { return mHeadUsedList; }
|
||||
|
||||
public:
|
||||
/* vt[04] */ virtual u32 getHeapType(); /* override */
|
||||
|
|
|
|||
|
|
@ -67,8 +67,19 @@ asm void CheckHeap(u32 param_1) {
|
|||
}
|
||||
#endif
|
||||
|
||||
asm int countUsed(JKRExpHeap* heap){nofralloc
|
||||
#include "m_Do/m_Do_main/asm/func_80005848.s"
|
||||
int countUsed(JKRExpHeap* heap) {
|
||||
|
||||
OSDisableScheduler();
|
||||
int counter = 0;
|
||||
JKRExpHeap::CMemBlock* used_blocks_head = heap->getHeadUsedList();
|
||||
|
||||
while (used_blocks_head) {
|
||||
used_blocks_head = used_blocks_head->getNextBlock();
|
||||
counter++;
|
||||
};
|
||||
|
||||
OSEnableScheduler();
|
||||
return counter;
|
||||
}
|
||||
|
||||
s32 HeapCheck::getUsedCount(void) const {
|
||||
|
|
|
|||
Loading…
Reference in New Issue