提交 dac3f22b 编写于 作者: I Igor Canadi

Fix the test failure

Summary: AllocateFromHugePage() can return nullptr, and then we need to try to allocate the block with AllocateNewBlock()

Test Plan: arena_test

Reviewers: sdong

Reviewed By: sdong

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D47607
上级 63e0f867
......@@ -90,8 +90,7 @@ char* Arena::AllocateFallback(size_t bytes, bool aligned) {
block_head = AllocateFromHugePage(size);
}
#endif
if (size == 0) {
assert(block_head == nullptr);
if (!block_head) {
size = kBlockSize;
block_head = AllocateNewBlock(size);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册