内存管理作为移植代码提供
This commit is contained in:
parent
87482cb10d
commit
e479ffe4d3
32
XX/Memory.h
32
XX/Memory.h
|
@ -1,31 +1,13 @@
|
|||
#ifndef __Memory_H__
|
||||
#define __Memory_H__
|
||||
|
||||
#include "Sys.h"
|
||||
#include "Kernel\Sys.h"
|
||||
|
||||
// 登录消息
|
||||
class LoginMessage : public MessageBase
|
||||
{
|
||||
public:
|
||||
ByteArray HardID; // 硬件ID
|
||||
ByteArray Key; // 登录密码
|
||||
ByteArray Salt; // 加盐
|
||||
IPEndPoint Local; // 内网地址
|
||||
|
||||
bool Reply; // 是否响应
|
||||
|
||||
// 初始化消息,各字段为0
|
||||
LoginMessage();
|
||||
|
||||
// 从数据流中读取消息
|
||||
virtual bool Read(Stream& ms);
|
||||
// 把消息写入数据流中
|
||||
virtual void Write(Stream& ms);
|
||||
|
||||
// 显示消息内容
|
||||
#if DEBUG
|
||||
virtual String& ToStr(String& str) const;
|
||||
#endif
|
||||
};
|
||||
// 初始化内存池
|
||||
bool _init_mem(void* pool, uint size)
|
||||
// 分配内存
|
||||
void* _alloc_mem(void* pool, uint size)
|
||||
// 释放内存
|
||||
bool _free_mem(void* pool, void *mem)
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue