⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mem.h

📁 小型的3D游戏引擎
💻 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 + -