79 |
|
class SheepMem { |
80 |
|
static uint32 align(uint32 size); |
81 |
|
protected: |
82 |
+ |
static uintptr zero_page; |
83 |
|
static uintptr base; |
84 |
|
static uintptr top; |
85 |
|
static const uint32 size = 0x40000; |
86 |
|
public: |
87 |
|
static bool Init(void); |
88 |
|
static void Exit(void); |
89 |
+ |
static uintptr ZeroPage(); |
90 |
|
static uintptr Reserve(uint32 size); |
91 |
|
static void Release(uint32 size); |
92 |
|
friend class SheepVar; |
98 |
|
return (size + 3) & -4; |
99 |
|
} |
100 |
|
|
101 |
+ |
inline uintptr SheepMem::ZeroPage() |
102 |
+ |
{ |
103 |
+ |
return zero_page; |
104 |
+ |
} |
105 |
+ |
|
106 |
|
inline uintptr SheepMem::Reserve(uint32 size) |
107 |
|
{ |
108 |
|
top -= align(size); |