浏览代码

Merge pull request #3114 from tyustli/cpp

[components] [cplusplus] fix Queue.h mpool bug
Bernard Xiong 5 年之前
父节点
当前提交
45e905141c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      components/cplusplus/Queue.h

+ 1 - 1
components/cplusplus/Queue.h

@@ -68,7 +68,7 @@ public:
 private:
 private:
     struct rt_messagequeue mID;
     struct rt_messagequeue mID;
 
 
-    char mPool[(sizeof(struct rt_messagequeue) + sizeof(T)) * queue_sz];
+    char mPool[(sizeof(void *) + RT_ALIGN(sizeof(T), RT_ALIGN_SIZE)) * queue_sz];
 };
 };
 
 
 }
 }