From 7adbabca871f7139cbeaff773569f83964ddfdd1 Mon Sep 17 00:00:00 2001 From: tyustli <1225613647@qq.com> Date: Mon, 30 Sep 2019 14:35:48 +0800 Subject: [PATCH] fix Queue.h mpool bug --- components/cplusplus/Queue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/cplusplus/Queue.h b/components/cplusplus/Queue.h index 351e3ec66b..23a4638798 100644 --- a/components/cplusplus/Queue.h +++ b/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]; }; }