mirror of
https://github.com/zeldaret/tp
synced 2026-05-23 06:54:28 -04:00
countUsed OK
This commit is contained in:
@@ -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 */
|
||||
|
||||
+13
-2
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user