diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2021-05-30 20:13:58 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2021-05-30 20:13:58 -0400 |
commit | daf02d9b198906d93a9b289315d0fc1e519843ef (patch) | |
tree | d111ed6157e21f26c4df2c2768084c51e58803d9 /include/heap.h | |
parent | 2e6a113eb27577764b1b6de22e04ae1f73d3069f (diff) |
Document heap.c, 3
Diffstat (limited to 'include/heap.h')
-rw-r--r-- | include/heap.h | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/include/heap.h b/include/heap.h index 3eb124ba..6910d4a6 100644 --- a/include/heap.h +++ b/include/heap.h @@ -11,28 +11,14 @@ struct UnkStruct_020EDB10 OSArenaId arena; }; -struct UnkStruct_020166C8 -{ - NNSFndHeapHandle *heapHandles; - NNSFndHeapHandle *unk04; - void **unk08; - u16 *unk0c; - u8 *heapIdxs; - u16 totalNumHeaps; - u16 nTemplates; - u16 unk18; - u16 unk1a; -}; - - -void FUN_020166C8(const struct UnkStruct_020EDB10 *templates, u32 nTemplates, u32 totalNumHeaps, u32 pre_size); -s32 FUN_020167F4(); -u32 FUN_0201681C(u32 param0, u32 heap_id, u32 param2); -u32 FUN_02016828(u32 param0, u32 param1, u32 param2); -u32 FUN_02016834(u32 param0, u32 param1, u32 size, s32 alignment); -void FUN_020168D0(u32 heap_id); -u32 *FUN_02016944(void *param0, u32 param1, s32 param2, u32 param3); -void FUN_02016988(); +void InitHeapSystem(const struct UnkStruct_020EDB10 *templates, u32 nTemplates, u32 totalNumHeaps, u32 pre_size); +s32 FindFirstAvailableHeapHandle(); +BOOL CreateHeap(u32 parent, u32 child, u32 size); +BOOL CreateHeapAtEnd(u32 parent, u32 child, u32 size); +BOOL CreateHeapInternal(u32 parent, u32 child, u32 size, s32 alignment); +void DestroyHeap(u32 heap_id); +void *AllocFromHeapInternal(NNSFndHeapHandle heap, u32 size, s32 alignment, u32 heap_id); +void AllocFail(); void *AllocFromHeap(u32 heap_id, u32 size); void *AllocFromHeapAtEnd(u32 heap_id, u32 size); void FreeToHeap(void *ptr); @@ -40,6 +26,6 @@ void FreeToHeapExplicit(u32 heap_id, void * ptr); u32 GF_ExpHeap_FndGetTotalFreeSize(u32 heap_id); void GF_ExpHeap_FndInitAllocator(NNSFndAllocator * pAllocator, u32 heap_id, int alignment); void ReallocFromHeap(void *ptr, u32 newSize); -u32 FUN_02016B90(u32 param0); +BOOL GF_heap_c_dummy_return_true(u32 heap_id); #endif //POKEDIAMOND_HEAP_H |