Skip to content
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

feat: Add C++ Mmap Wrapper #341

Merged
merged 1 commit into from
Aug 22, 2024
Merged

feat: Add C++ Mmap Wrapper #341

merged 1 commit into from
Aug 22, 2024

Conversation

cvonelm
Copy link
Member

@cvonelm cvonelm commented Aug 2, 2024

In preperation for CUPTI support, this commit adds a SharedMemory class that wraps Mmap and converts the EventReader to use it.

Copy link
Member

@bmario bmario left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added comments in #294

include/lo2s/shared_memory.hpp Show resolved Hide resolved
include/lo2s/shared_memory.hpp Outdated Show resolved Hide resolved
include/lo2s/shared_memory.hpp Outdated Show resolved Hide resolved
include/lo2s/shared_memory.hpp Outdated Show resolved Hide resolved
@cvonelm cvonelm force-pushed the introduc_shmem_class branch 2 times, most recently from f7be674 to d90a155 Compare August 19, 2024 14:50

~SharedMemory()
{
if (addr_ != nullptr)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extract into function

Comment on lines 56 to 59
if (addr_ != nullptr)
{
munmap(addr_, size_);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extract into function and use in desctructor

In preperation for CUPTI support, this commit adds a SharedMemory class
that wraps Mmap and converts the EventReader to use it.
@cvonelm cvonelm merged commit a323e32 into master Aug 22, 2024
40 of 41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants