mirror of
https://github.com/zeldaret/ss
synced 2026-06-24 01:11:25 -04:00
dHeap(Allocator) work
This commit is contained in:
+14
-12
@@ -17,14 +17,15 @@ namespace EGG {
|
||||
class Allocator;
|
||||
|
||||
struct HeapAllocArg {
|
||||
int userArg; // 00
|
||||
void *userArg; // 00
|
||||
u32 size; // 04
|
||||
int align; // 08
|
||||
Heap *heap; // 0C heap to allocate in
|
||||
int another; // 10
|
||||
|
||||
inline HeapAllocArg() : userArg(0), size(0), align(0), heap(nullptr) {}
|
||||
};
|
||||
typedef void (*HeapAllocCallback)(HeapAllocArg &arg);
|
||||
typedef void (*HeapAllocCallback)(HeapAllocArg *arg);
|
||||
|
||||
struct HeapErrorArg {
|
||||
const char *msg;
|
||||
@@ -32,13 +33,14 @@ struct HeapErrorArg {
|
||||
|
||||
inline HeapErrorArg() {}
|
||||
};
|
||||
typedef void (*ErrorCallback)(void *);
|
||||
typedef void (*ErrorCallback)(HeapErrorArg *);
|
||||
|
||||
struct HeapFreeArg {
|
||||
u32 arg1; // Idk the args
|
||||
u32 arg2;
|
||||
void *userArg;
|
||||
int arg1;
|
||||
int arg2;
|
||||
};
|
||||
typedef void (*HeapFreeCallback)(void *);
|
||||
typedef void (*HeapFreeCallback)(HeapFreeArg *);
|
||||
|
||||
typedef void (*HeapCreateCallback)(void *);
|
||||
typedef void (*HeapDestroyCallback)(void *);
|
||||
@@ -151,14 +153,14 @@ public:
|
||||
/* 80576760 */ static void *sFreeCallbackArg;
|
||||
/* 80576764 */ static HeapCreateCallback sCreateCallback;
|
||||
/* 80576764 */ static HeapDestroyCallback sDestroyCallback;
|
||||
|
||||
/* 80495a60 */ void *operator new(size_t, void *p);
|
||||
/* 80495a70 */ void *operator new(size_t size, EGG::Heap *heap, u32 align);
|
||||
/* 80495a80 */ void *operator new(size_t size, EGG::Allocator *alloc);
|
||||
/* 80495a90 */ void *operator new[](size_t size, u32 align);
|
||||
/* 80495aa0 */ void *operator new[](size_t size, EGG::Heap *heap, int align);
|
||||
};
|
||||
|
||||
} // namespace EGG
|
||||
|
||||
/* 80495a60 */ void *operator new(size_t, void *p);
|
||||
/* 80495a70 */ void *operator new(size_t size, EGG::Heap *heap, u32 align);
|
||||
/* 80495a80 */ void *operator new(size_t size, EGG::Allocator *alloc);
|
||||
/* 80495a90 */ void *operator new[](size_t size, u32 align);
|
||||
/* 80495aa0 */ void *operator new[](size_t size, EGG::Heap *heap, int align);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user