mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
THA docs (#1177)
* THA docs Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> * format * namefixer * yada * remove zero pad comment * Update include/z64.h Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Update include/thga.h Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * namefixer * bss * namefixer --------- Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
This commit is contained in:
co-authored by
Tharo
engineer124
parent
f3d2c56d1d
commit
147e4fcedc
@@ -0,0 +1,28 @@
|
||||
#ifndef THA_H
|
||||
#define THA_H
|
||||
|
||||
#include "ultra64.h"
|
||||
#include "libc/stdint.h"
|
||||
|
||||
typedef struct TwoHeadArena {
|
||||
/* 0x0 */ size_t size;
|
||||
/* 0x4 */ void* start;
|
||||
/* 0x8 */ void* head;
|
||||
/* 0xC */ void* tail;
|
||||
} TwoHeadArena; // size = 0x10
|
||||
|
||||
void* THA_GetHead(TwoHeadArena* tha);
|
||||
void THA_SetHead(TwoHeadArena* tha, void* newHead);
|
||||
void* THA_GetTail(TwoHeadArena* tha);
|
||||
void* THA_AllocHead(TwoHeadArena* tha, size_t size);
|
||||
void* THA_AllocHeadByte(TwoHeadArena* tha);
|
||||
void* THA_AllocTail(TwoHeadArena* tha, size_t size);
|
||||
void* THA_AllocTailAlign16(TwoHeadArena* tha, size_t size);
|
||||
void* THA_AllocTailAlign(TwoHeadArena* tha, size_t size, uintptr_t mask);
|
||||
s32 THA_GetRemaining(TwoHeadArena* tha);
|
||||
u32 THA_IsCrash(TwoHeadArena* tha);
|
||||
void THA_Reset(TwoHeadArena* tha);
|
||||
void THA_Init(TwoHeadArena* tha, void* start, size_t size);
|
||||
void THA_Destroy(TwoHeadArena* tha);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user