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

📄 smemorychunk.h

📁 用C++编写的一个对系统内存的管理
💻 H
字号:
/******************
SMemoryChunk.h
******************/

/*!\file SMemoryChunk.h
 * \brief Contains the "SMemoryChunk" Type-definition.
 */

#ifndef __INC_SMemoryChunk_h__
#define __INC_SMemoryChunk_h__

#include "IMemoryBlock.h"

namespace MemPool
{

/*!\class SMemoryChunk
 * \brief Memory Chunk Struct
 *
 * This struct will hold (and manage) the actual allocated Memory.
 * Every MemoryChunk will point to a MemoryBlock, and another SMemoryChunk,
 * thus creating a linked-list of MemoryChunks.
 */
typedef struct SMemoryChunk
{
  TByte *Data ;				//!< The actual Data
  std::size_t DataSize ;	//!< Size of the "Data"-Block
  std::size_t UsedSize ;	//!< actual used Size
  bool IsAllocationChunk ;	//!< true, when this MemoryChunks Points to a "Data"-Block which can be deallocated via "free()"
  SMemoryChunk *Next ;		//!< Pointer to the Next MemoryChunk in the List (may be NULL)

} SMemoryChunk ;

}

#endif /* __INC_SMemoryChunk_h__ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -