소스 검색

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:
     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];
 };
 
 }