-
Notifications
You must be signed in to change notification settings - Fork 403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add relocatable pointers #20
Add relocatable pointers #20
Conversation
Signed-off-by: Hintz Martin (CC-AD/ESW1) <[email protected]>
// we let the OS decide where to map the shm segments | ||
constexpr void* BASE_ADDRESS_HINT{nullptr}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we save some pointer arithmetic by giving the operating system a hint that will mostly work for all applications? I could imagine the performance might be slightly better if there is no offset.
@elBoberido @elfenpiff Are there any performance measurements w/ and w/o relocatable pointer?
// we let the OS decide where to map the shm segments | ||
constexpr void* BASE_ADDRESS_HINT{nullptr}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
|
||
/// @todo this is a temporary dummy variable to keep the size of the ChunkHeader at 64 byte for compatibility | ||
/// reasons | ||
void* m_payloadDummy{nullptr}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
m_payloadPadding?
/// @todo since we are now fully relocatable, this can be removed | ||
uintptr_t m_sharedMemoryBaseAddressOffset = 0; | ||
bool m_verifySharedMemoryPlacement = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you create a follow-up issue for this?
/// @todo the best guess mapping address as long as we do not have introduced relative pointers | ||
defaultConfig.roudi.m_sharedMemoryBaseAddressOffset = 0x3E80000000ull; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please either remove it or use it as a hint.
// we let the OS decide where to map the shm segments | ||
constexpr void* BASE_ADDRESS_HINT{nullptr}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
Fixes #19
Signed-off-by: Hintz Martin (CC-AD/ESW1) [email protected]