-
Notifications
You must be signed in to change notification settings - Fork 173
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
SHM subsystem: Rust #823
SHM subsystem: Rust #823
Conversation
Conflicts: commons/zenoh-codec/src/core/shm.rs
…generation support
- generation works
- use numeric ID instead of string ID for SHM buffer identification - this feature speeds up segment lookups and reduces wire overhead - remove unnecessary fields from SharedMemoryManager - fix clippy warnings - added comments
- support ProtocolID exchange in establish - convert buffer based on supported protocol ids
array: ArrayInSHM<AuthSegmentID, AuthChallenge, usize>, | ||
} | ||
|
||
impl AuthSegment { |
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.
With the current SHM system there is some leaking due to the shm segment never be closed.
How this new system will clean up all AuthSegment
?
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.
AuthSegment
, as any other zenoh SHM component, uses posix_shm::array::ArrayInSHM
for managing shared memory. Previous SHM system used posix segment mapping on the filesystem - this mechanism required to manually delete SHM-mapped files to free shared memory and was unacceptable because our process might crash with no way to delete mapped files. The new SHM system uses system handles that are automatically unlinked when last linked process terminates, avoiding memory leakage.
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.
Great, that's neat! :)
@Mallets I resolved discussions where I made fixes |
Closes #685
Closes #827