Explorar o código

fix Queue.h mpool bug

tyustli %!s(int64=5) %!d(string=hai) anos
pai
achega
7adbabca87
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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];
 };
 
 }