blob: f260f1e118324c5af7c9806311f0261376310ede (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#ifndef EGG_ALLOCATOR_H
#define EGG_ALLOCATOR_H
#include "common.h"
#include "rvl/MEM.h" // IWYU pragma: export
void MEMInitAllocatorFor_Heap(MEMAllocator *alloc, s32 align, void *heap);
namespace EGG {
class Heap;
class Allocator : public MEMAllocator {
public:
Allocator(Heap *heap, s32 align);
public:
/* vt 0x08 */ virtual ~Allocator();
/* vt 0x0C */ virtual void *alloc(u32 size);
/* vt 0x10 */ virtual void free(void *block);
inline MEMAllocator *getHandle() {
return static_cast<MEMAllocator *>(this);
}
Heap *getHeap() {
return mHeap;
}
/* 0x14 */ Heap *mHeap;
/* 0x18 */ s32 align;
};
}; // namespace EGG
#endif
|