Skip to content

Commit

Permalink
handle map_failed
Browse files Browse the repository at this point in the history
  • Loading branch information
willsfeng committed Mar 22, 2024
1 parent 6edf10a commit 2204ec4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion velox/common/memory/MmapAllocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ bool MmapAllocator::allocateContiguousImpl(
}
}
// TODO: add handling of MAP_FAILED.
if (data == nullptr) {
if (data == nullptr || MAP_FAILED) {
const std::string errorMsg = fmt::format(
"Mmap failed with {} pages use MmapArena {}",
numPages,
Expand Down

0 comments on commit 2204ec4

Please sign in to comment.