mirror of https://github.com/facebook/rocksdb.git
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
This commit is contained in:
parent
63e0f86797
commit
dac3f22b77
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue