mirror of
https://github.com/zeldaret/ss
synced 2026-05-26 15:45:19 -04:00
28 lines
672 B
C++
28 lines
672 B
C++
#ifndef EGG_ALLOCATOR_H
|
|
#define EGG_ALLOCATOR_H
|
|
#include "rvl/MEM.h"
|
|
#include <common.h>
|
|
|
|
/* 80495310 */ void MEMInitAllocatorFor_Heap(MEMAllocator *alloc, s32 align, void *heap);
|
|
|
|
namespace EGG {
|
|
class Heap;
|
|
class Allocator : public MEMAllocator {
|
|
public:
|
|
/* 80495330 */ Allocator(Heap *heap, s32 align);
|
|
|
|
public:
|
|
/* vt 0x08 | 80495380 */ virtual ~Allocator();
|
|
/* vt 0x0C | 804953c0 */ virtual void *alloc(u32 size);
|
|
/* vt 0x10 | 804953e0 */ virtual void free(void *block);
|
|
|
|
inline MEMAllocator *getHandle() {
|
|
return static_cast<MEMAllocator *>(this);
|
|
}
|
|
/* 0x14 */ Heap *mHeap;
|
|
/* 0x18 */ s32 align;
|
|
};
|
|
}; // namespace EGG
|
|
|
|
#endif
|