diff options
Diffstat (limited to 'src/memory_mid.c')
-rw-r--r-- | src/memory_mid.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/memory_mid.c b/src/memory_mid.c index 32628cb..1eb707c 100644 --- a/src/memory_mid.c +++ b/src/memory_mid.c @@ -15,32 +15,32 @@ void *DoAlloc(struct HeapDescriptor *, s32, u32); void FatalError(u32 *, u32 *, ...) __attribute__((noreturn)); -s32 _LocateSet(struct HeapDescriptor *heap, s32 size, s32 param_3) +s32 _LocateSet(struct HeapDescriptor *heap, s32 size, s32 group) { s32 index; struct HeapDescriptor * uVar2; - s32 uVar3; + s32 atb; if (heap == NULL) { heap = &gMainHeapDescriptor; } // Set some sort flag/attr? - uVar3 = param_3 >> 8 | 1; + atb = group >> 8 | 1; // Reset it? - param_3 = param_3 & 0xff; + group = group & 0xff; - if ((uVar3 & 2) != 0) { - index = MemorySearchFromFront(heap,uVar3,size); + if ((atb & 2) != 0) { + index = MemorySearchFromFront(heap,atb,size); if (index < 0) goto error; - uVar2 = _LocateSetFront(heap,index,uVar3,size,param_3); + uVar2 = _LocateSetFront(heap,index,atb,size,group); return uVar2->freeCount; } else { - index = MemorySearchFromBack(heap,uVar3,size); + index = MemorySearchFromBack(heap,atb,size); if (index < 0) goto error; - uVar2 = _LocateSetBack(heap,index,uVar3,size,param_3); + uVar2 = _LocateSetBack(heap,index,atb,size,group); return uVar2->freeCount; } @@ -49,7 +49,7 @@ error: // atb %02x grp %3d FatalError(&gUnknown_80B7F14, &gUnknown_80B7F20, - heap,size,uVar3,param_3); + heap,size,atb,group); } void *MemoryAlloc(s32 size, s32 b) |