Skip to content

Commit

Permalink
Indentation fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
indrajit96 committed Jun 6, 2024
1 parent 4d68cae commit 105893d
Showing 1 changed file with 17 additions and 19 deletions.
36 changes: 17 additions & 19 deletions src/pinned_memory_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -356,26 +356,24 @@ PinnedMemoryManager::Create(const Options& options)
"Failed to add Pinned Memory buffer with host policy: " +
std::string(ex.what()));
}
} else {
LOG_INFO << "Pinned memory pool disabled";
}
}
else
{
LOG_INFO << "Pinned memory pool disabled";
}
// If no pinned memory is allocated, add an empty entry where all allocation
// will be on normal system memory
if (instance_->pinned_memory_buffers_.empty()) {
try {
instance_->AddPinnedMemoryBuffer(
std::shared_ptr<PinnedMemory>(new PinnedMemory(
nullptr, options.pinned_memory_pool_byte_size_)),
0);
}
catch (const std::exception& ex) {
return Status(
Status::Code::INTERNAL,
"Failed to add empty Pinned Memory entry: " +
std::string(ex.what()));
// If no pinned memory is allocated, add an empty entry where all
// allocation will be on normal system memory
if (instance_->pinned_memory_buffers_.empty()) {
try {
instance_->AddPinnedMemoryBuffer(
std::shared_ptr<PinnedMemory>(new PinnedMemory(
nullptr, options.pinned_memory_pool_byte_size_)),
0);
}
catch (const std::exception& ex) {
return Status(
Status::Code::INTERNAL,
"Failed to add empty Pinned Memory entry: " +
std::string(ex.what()));
}
}
}
}
Expand Down

0 comments on commit 105893d

Please sign in to comment.