mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-06-02 17:48:24 -04:00
ñmatch malloc,link memtrk
This commit is contained in:
@@ -33,11 +33,11 @@ typedef struct ExtabIndexInfo {
|
||||
u32 codeSize; // at 0x10
|
||||
} ExtabIndexInfo;
|
||||
|
||||
__declspec(section ".init") extern const RomSection _rom_copy_info[];
|
||||
__declspec(section ".init") extern const BssSection _bss_init_info[];
|
||||
__declspec(section ".init") extern const ExtabIndexInfo _eti_init_info[];
|
||||
__declspec(section ".init") extern RomSection _rom_copy_info[];
|
||||
__declspec(section ".init") extern BssSection _bss_init_info[];
|
||||
__declspec(section ".init") extern ExtabIndexInfo _eti_init_info[];
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
#ifndef OS_MALLOC_H
|
||||
#define OS_MALLOC_H
|
||||
#include "types.h"
|
||||
#include "libultra/osThread.h"
|
||||
#include "libultra/osMesg.h"
|
||||
#include "libultra/u64types.h"
|
||||
|
||||
struct ArenaNode;
|
||||
|
||||
typedef struct Arena {
|
||||
/* 0x00 */ struct ArenaNode* head;
|
||||
/* 0x04 */ void* start;
|
||||
/* 0x08 */ OSMesgQueue lockQueue;
|
||||
/* 0x20 */ u8 unk_20;
|
||||
/* 0x21 */ u8 isInit;
|
||||
/* 0x22 */ u8 flag;
|
||||
} Arena; // size = 0x24
|
||||
|
||||
typedef struct ArenaNode {
|
||||
/* 0x00 */ s16 magic;
|
||||
/* 0x02 */ s16 isFree;
|
||||
/* 0x04 */ u32 size;
|
||||
/* 0x08 */ struct ArenaNode* next;
|
||||
/* 0x0C */ struct ArenaNode* prev;
|
||||
/* 0x10 */ const char* filename;
|
||||
/* 0x14 */ s32 line;
|
||||
/* 0x18 */ OSId threadId;
|
||||
/* 0x1C */ Arena* arena;
|
||||
/* 0x20 */ OSTime time;
|
||||
/* 0x28 */ u8 unk_28[0x30-0x28]; // probably padding
|
||||
} ArenaNode; // size = 0x30
|
||||
|
||||
void* __osMalloc(Arena*, size_t);
|
||||
void __osFree(Arena*, void*);
|
||||
void __osDisplayArena(Arena*);
|
||||
void __osGetFreeArena(Arena*, u32*, u32*, u32*);
|
||||
void __osMallocInit(Arena*, void*, u32);
|
||||
void __osMallocCleanup(Arena*);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,18 @@
|
||||
#ifndef OS_MESG_H
|
||||
#define OS_MESG_H
|
||||
|
||||
#include "types.h"
|
||||
#include "dolphin/os/OSThread.h"
|
||||
|
||||
typedef void* OSMesg;
|
||||
|
||||
typedef struct OSMesgQueue {
|
||||
/* 0x00 */ OSThread* mtqueue;
|
||||
/* 0x04 */ OSThread* fullqueue;
|
||||
/* 0x08 */ s32 validCount;
|
||||
/* 0x0C */ s32 first;
|
||||
/* 0x10 */ s32 msgCount;
|
||||
/* 0x14 */ OSMesg* msg;
|
||||
} OSMesgQueue; // size = 0x18
|
||||
|
||||
#endif
|
||||
@@ -2,7 +2,8 @@
|
||||
#define LOS_THREAD_H
|
||||
|
||||
#include "types.h"
|
||||
#include "dolphin/OSThread.h"
|
||||
#include "dolphin/os/OSThread.h"
|
||||
|
||||
typedef s32 OSPri;
|
||||
typedef s32 OSId;
|
||||
|
||||
@@ -10,4 +11,4 @@ typedef s32 OSId;
|
||||
|
||||
OSId osGetThreadId(OSThread*);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
#include "types.h"
|
||||
|
||||
typedef u64 OSTime;
|
||||
|
||||
typedef struct {
|
||||
u32 r:8;
|
||||
u32 g:8;
|
||||
|
||||
Reference in New Issue
Block a user