File tree Expand file tree Collapse file tree 2 files changed +46
-0
lines changed
XEngine_Source/XEngine_MQServiceApp Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Original file line number Diff line number Diff line change 11XEngine_MQService V3.16.0.1001
22
3+ 增加:使用内存池发送数据
34增加:CI发布更多系统支持
45增加:HTTP创建主题支持
56更新:编译脚本
@@ -16,6 +17,7 @@ XEngine_MQService V3.16.0.1001
1617修复:删除协议解析不生效
1718删除:多余代码
1819
20+ added:memory pool send message
1921added:ci more release support
2022added:create topic support for http
2123update:make file build flags
Original file line number Diff line number Diff line change 1+ #pragma once
2+ /* *******************************************************************
3+ // Created: 2025/05/24 10:55:24
4+ // File Name: D:\XEngine_MQService\XEngine_Source\XEngine_MQServiceApp\MQService_MemoryPool.h
5+ // File Path: D:\XEngine_MQService\XEngine_Source\XEngine_MQServiceApp
6+ // File Base: MQService_MemoryPool
7+ // File Ext: h
8+ // Project: XEngine
9+ // Author: qyt
10+ // Purpose: 内存池封装
11+ // History:
12+ *********************************************************************/
13+ class CMQService_MemoryPool
14+ {
15+ public:
16+ CMQService_MemoryPool (size_t nSize)
17+ {
18+ lPtr = ManagePool_Memory_Alloc (xhMemPool, nSize);
19+ if (NULL == lPtr)
20+ {
21+ XLOG_PRINT (xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ALERT, _X (" 内存池分配失败,系统面临崩溃!" ));
22+ return ;
23+ }
24+ }
25+ ~CMQService_MemoryPool ()
26+ {
27+ if (NULL != lPtr)
28+ {
29+ ManagePool_Memory_Free (xhMemPool, lPtr);
30+ }
31+ }
32+ public:
33+ // 支持类型转换
34+ template <typename T>
35+ T* as () {
36+ return static_cast <T*>(lPtr);
37+ }
38+ XCHAR* get ()
39+ {
40+ return static_cast <XCHAR*>(lPtr);
41+ }
42+ private:
43+ XPVOID lPtr = NULL ;
44+ };
You can’t perform that action at this time.
0 commit comments