Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ACS
Public
VILLASframework
VILLAScommon
Commits
b8778630
Commit
b8778630
authored
Sep 19, 2021
by
Steffen Vogel
🎅🏼
Browse files
cppcheck fixes
parent
dcbf6ddc
Changes
3
Show whitespace changes
Inline
Side-by-side
include/villas/memory.hpp
View file @
b8778630
...
@@ -41,6 +41,9 @@ class MemoryBlock {
...
@@ -41,6 +41,9 @@ class MemoryBlock {
public:
public:
using
deallocator_fn
=
std
::
function
<
void
(
MemoryBlock
*
)
>
;
using
deallocator_fn
=
std
::
function
<
void
(
MemoryBlock
*
)
>
;
using
Ptr
=
std
::
shared_ptr
<
MemoryBlock
>
;
// cppcheck-suppress passedByValue
MemoryBlock
(
size_t
offset
,
size_t
size
,
MemoryManager
::
AddressSpaceId
addrSpaceId
)
:
MemoryBlock
(
size_t
offset
,
size_t
size
,
MemoryManager
::
AddressSpaceId
addrSpaceId
)
:
offset
(
offset
),
size
(
size
),
addrSpaceId
(
addrSpaceId
)
{}
offset
(
offset
),
size
(
size
),
addrSpaceId
(
addrSpaceId
)
{}
...
...
include/villas/memory_manager.hpp
View file @
b8778630
...
@@ -230,8 +230,8 @@ public:
...
@@ -230,8 +230,8 @@ public:
MemoryTranslation
MemoryTranslation
getTranslation
(
AddressSpaceId
fromAddrSpaceId
,
AddressSpaceId
toAddrSpaceId
);
getTranslation
(
AddressSpaceId
fromAddrSpaceId
,
AddressSpaceId
toAddrSpaceId
);
MemoryTranslation
// cppcheck-suppress passedByValue
getTranslationFromProcess
(
AddressSpaceId
foreignAddrSpaceId
)
MemoryTranslation
getTranslationFromProcess
(
AddressSpaceId
foreignAddrSpaceId
)
{
return
getTranslation
(
getProcessAddressSpace
(),
foreignAddrSpaceId
);
}
{
return
getTranslation
(
getProcessAddressSpace
(),
foreignAddrSpaceId
);
}
static
std
::
string
static
std
::
string
...
...
lib/memory.cpp
View file @
b8778630
...
@@ -70,7 +70,7 @@ HostRam::HostRamAllocator::allocateBlock(size_t size)
...
@@ -70,7 +70,7 @@ HostRam::HostRamAllocator::allocateBlock(size_t size)
return
mem
;
return
mem
;
}
}
// cppcheck-suppress passedByValue
LinearAllocator
::
LinearAllocator
(
MemoryManager
::
AddressSpaceId
memoryAddrSpaceId
,
LinearAllocator
::
LinearAllocator
(
MemoryManager
::
AddressSpaceId
memoryAddrSpaceId
,
size_t
memorySize
,
size_t
memorySize
,
size_t
internalOffset
)
:
size_t
internalOffset
)
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment