Commit a206c720 authored by zhanxw's avatar zhanxw

Fix boundary case

parent d55135a6
......@@ -17,7 +17,7 @@ RingMemoryPool::RingMemoryPool(int numElementsInChunk, int numChunk) {
init(numElementsInChunk, numChunk);
}
void RingMemoryPool::init(int numElementsInChunk, int numChunk) {
assert(numElementsInChunk > 0);
assert(numElementsInChunk >= 0);
assert(numChunk > 0);
numElementsInChunk_ = numElementsInChunk;
memory_.resize((size_t)numElementsInChunk * numChunk);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment