mirror of
https://github.com/pret/pmd-red.git
synced 2026-08-27 19:24:58 -05:00
Decomped DoAlloc
Decomped by Kermalis
This commit is contained in:
@@ -5,18 +5,6 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start DoAlloc
|
||||
DoAlloc:
|
||||
push {lr}
|
||||
movs r3, 0x80
|
||||
lsls r3, 1
|
||||
orrs r3, r2
|
||||
adds r2, r3, 0
|
||||
bl _LocateSet
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end DoAlloc
|
||||
|
||||
thumb_func_start DoFree
|
||||
DoFree:
|
||||
push {r4-r7,lr}
|
||||
|
||||
@@ -87,5 +87,6 @@ void *MemoryAlloc(s32 size, s32 group);
|
||||
void MemoryFree(void *a);
|
||||
struct HeapDescriptor *DoCreateSubHeap(struct unkMemoryStruct *a, u32 b);
|
||||
void xxx_unused_memory_free(struct HeapDescriptor *a1);
|
||||
void *DoAlloc(struct HeapDescriptor *heap, s32 size, u32 a2);
|
||||
|
||||
#endif // GUARD_MEMORY_H
|
||||
|
||||
@@ -89,7 +89,6 @@ struct HeapDescriptor *MemoryLocate_LocalCreate(struct HeapDescriptor *parentHea
|
||||
return iVar3;
|
||||
}
|
||||
|
||||
// Note: This is called after _LocateSetBack which currently returns a HeapDescriptor* which is incorrect
|
||||
struct HeapDescriptor *DoCreateSubHeap(struct unkMemoryStruct *a, u32 b)
|
||||
{
|
||||
struct HeapMemoryBlock2 s2;
|
||||
@@ -134,3 +133,8 @@ void xxx_unused_memory_free(struct HeapDescriptor *a1)
|
||||
DoFree(a1->parentHeap, a1);
|
||||
}
|
||||
}
|
||||
|
||||
void *DoAlloc(struct HeapDescriptor *heap, s32 size, u32 a2)
|
||||
{
|
||||
return _LocateSet(heap, size, a2 | 0x100);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user