Browse Source

fix Queue.h mpool bug

tyustli 6 năm trước cách đây
mục cha
commit
7adbabca87
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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];
 };
 
 }