summaryrefslogtreecommitdiff
path: root/include/JSystem/JKernel/JKRAramBlock.h
blob: 630547f07c66d654c0610c122c73231261803ea9 (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
35
36
#ifndef JKRARAMBLOCK_H
#define JKRARAMBLOCK_H

#include "JSystem/JSupport/JSUList.h"

class JKRAramHeap;
class JKRAramBlock {
public:
    JKRAramBlock(u32, u32, u32, u8, bool);
    virtual ~JKRAramBlock();

    JKRAramBlock* allocHead(u32, u8, JKRAramHeap*);
    JKRAramBlock* allocTail(u32, u8, JKRAramHeap*);

    u32 getAddress() const { return mAddress; }

    u32 getSize() const { return mSize; }

    u32 getFreeSize() const { return mFreeSize; }

    bool isTempMemory() const { return mIsTempMemory; }

    void newGroupID(u8 groupId) { mGroupId = groupId; }

public:
    /* 0x00 */  // vtable
    /* 0x04 */ JSULink<JKRAramBlock> mBlockLink;
    /* 0x14 */ u32 mAddress;
    /* 0x18 */ u32 mSize;
    /* 0x1C */ u32 mFreeSize;
    /* 0x20 */ u8 mGroupId;
    /* 0x21 */ bool mIsTempMemory;
    /* 0x22 */ u8 padding[2];
};

#endif /* JKRARAMBLOCK_H */