Skip to content

Commit

Permalink
iox-eclipse-iceoryx#1036 Copyright header, typos and fixed issue when…
Browse files Browse the repository at this point in the history
… accessing baseAddressHint when the optional is not set

Signed-off-by: Christian Eltzschig <me@elchris.org>
  • Loading branch information
elfenpiff committed Jan 26, 2022
1 parent b6fdfe1 commit 06abc06
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion iceoryx_hoofs/include/iceoryx_hoofs/cxx/helplets.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (c) 2019 by Robert Bosch GmbH. All rights reserved.
// Copyright (c) 2021 by Apex.AI Inc. All rights reserved.
// Copyright (c) 2021 - 2022 by Apex.AI Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class MemoryMap;
class MemoryMapBuilder
{
/// @brief The base address suggestion to which the memory should be mapped. But
/// there is not guarantee that it is really mapped at this position.
/// there is no guarantee that it is really mapped at this position.
/// One has to verify with .getBaseAddress if the hint was accepted.
/// Setting it to nullptr means no suggestion
IOX_BUILDER_PARAMETER(const void*, baseAddressHint, nullptr)
Expand All @@ -80,7 +80,7 @@ class MemoryMapBuilder
IOX_BUILDER_PARAMETER(int32_t, fileDescriptor, 0)

/// @brief Defines if the memory should be mapped read only or with write access.
/// A read only memory section will cause a segmentation fault when be written to.
/// A read only memory section will cause a segmentation fault when written to.
IOX_BUILDER_PARAMETER(AccessMode, accessMode, AccessMode::READ_WRITE)

/// @brief Sets the flags defining how the mapped data should be handled
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved.
// Copyright (c) 2021 by Apex.AI Inc. All rights reserved.
// Copyright (c) 2021 - 2022 by Apex.AI Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ SharedMemoryObject::SharedMemoryObject(const SharedMemory::Name_t& name,
static_cast<unsigned long long>(memorySizeInBytes),
ACCESS_MODE_STRING[static_cast<uint64_t>(accessMode)],
OPEN_MODE_STRING[static_cast<uint64_t>(openMode)],
*baseAddressHint,
(baseAddressHint) ? *baseAddressHint : nullptr,
std::bitset<sizeof(mode_t)>(permissions).to_ulong());

memset(m_memoryMap->getBaseAddress(), 0, m_memorySizeInBytes);
Expand Down

0 comments on commit 06abc06

Please sign in to comment.