提交 0df13a57 编写于 作者: Y yq0 提交者: wangzelin.wzl

fix slice_alloc.h uint32_t overflow bug

上级 3fa7f397
......@@ -93,12 +93,9 @@ private:
class ObEmbedFixedQueue {
public:
ObEmbedFixedQueue() : push_(0), pop_(0), capacity_(0)
{}
~ObEmbedFixedQueue()
{}
void init(uint32_t capacity)
{
ObEmbedFixedQueue(): push_(0), pop_(0), capacity_(0) {}
~ObEmbedFixedQueue() {}
void init(uint64_t capacity) {
capacity_ = capacity;
memset(data_, 0, sizeof(void*) * capacity);
}
......@@ -120,9 +117,9 @@ public:
}
private:
uint32_t push_ CACHE_ALIGNED;
uint32_t pop_ CACHE_ALIGNED;
uint32_t capacity_ CACHE_ALIGNED;
uint64_t push_ CACHE_ALIGNED;
uint64_t pop_ CACHE_ALIGNED;
uint64_t capacity_ CACHE_ALIGNED;
void* data_[];
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册