📄 mem.h
字号:
#ifndef _MEM_H_
#define _MEM_H_
#include "../global.h"
class GcMem
{
public:
// Allocate a pool of memory
bool Init(uint size, bool vidMem = true);
// "Allocate" a amount of memory from the pool
void *Allocate(uint size);
// "Free" the memory back to the pool
//void Free(void *pointer);
// using video memory or not?
bool VideoMemory() const { return videoMem; }
// De-allocate the pool
void ShutDown();
private:
byte *memPool; // The memory pool
uint poolSize; // The size of the pool
uint usedSize; // The amount of memory used
bool videoMem; // Is memory on the gfx card?
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -