MCPcopy Create free account
hub / github.com/aws/clock-bound / drop

Method drop

clock-bound/src/vmclock/shm_reader.rs:105–113  ·  view source on GitHub ↗

Drop the `MmapGuard` and unmap the file it tracks.

(&mut self)

Source from the content-addressed store, hash-verified

103impl Drop for MmapGuard {
104 /// Drop the `MmapGuard` and unmap the file it tracks.
105 fn drop(&mut self) {
106 // SAFETY: `segment` was previously returned from `mmap`, and therefore
107 // when this destructor runs there are no more live references into
108 // it.
109 unsafe {
110 let ret = libc::munmap(self.segment, self.segsize);
111 assert_eq!(0, ret);
112 }
113 }
114}
115
116/// Reader for VMClock shared memory segment.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected